The name 'Geoprocessing' does not exist in the current context

563
1
06-05-2019 08:57 AM
TimWitt2
MVP Alum

I am trying the following example https://developers.arcgis.com/labs/pro/analysis-with-python/

But I get an error that "The name 'Geoprocessing' does not exist in the current context" and also "The name 'GPMessageBoxStyle' does not exist in the current context" .

I also noticed that a couple of my using are grayed out with the note "Using directives is unnecessary".

Anybody ran into this issue before?

Tags (1)
0 Kudos
1 Reply
DavidMetzler1
New Contributor II

I ran  into this same problem. for anyone who needs it this is how I solved it. 

  1. add using System.Reflection;  to the using calls of the RunPython.cs
  2. add using ArcGIS.Desktop.Core.Geoprocessing;  to the using calls of the RunGP.cs

This resolved all errors for me

cheers 

0 Kudos