"Value does not fall within expected range."

3421
2
08-02-2017 02:11 PM
mfcallahan
Occasional Contributor II

When right clicking a project in Visual Studio 2015 and selecting Add > New item > ArcGIS Pro Add-ins, an error message stating "Value does not fall within expected range." is displayed. Visual Studio then presents the

Add New Item dialog box again.  After clicking "OK" on the error message, the newly added control appear to be functioning normally.  I googled this error quickly and saw some suggestions to delete the .user and .suo files and the bing and obj folders, however the error message still persists.  Has anyone else experienced this?

After selecteing an ArcGIS Pro SDK item to add, this error message is displayed.

0 Kudos
2 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi Matthew,

 I was not able to duplicate your scenario.  Just to recap, you have an existing add-in project (c#) and you try to add a new add-in template item to your existing project.  At the point right after you "drill down" to the "ArcGIS Pro Add-ins" item templates selection list you get an error pop-up?  I tried this exact scenario and didn't get the error message.  Just to make sure that the setup worked properly can you please try the following and then retest:  

  1. Open a "Developer Command Prompt for VS2015" command running as Administrator (under applications, Visual Studio 2015 folder)
  2. Close all instances of Visual Studio
  3. In the command prompt run this command: devenv /setup
  4. Note: if you get the error "The operation could not be completed. The requested operation requires elevation." you have to open the VS 2015 command prompt by 'running it as Administrator'.
  5. After the /setup command completes try your scenario once more.
0 Kudos
RickPutnam
New Contributor

I am having a similar experience in Visual Studio 2017. I have uninstalled and reinstalled the SDK extensions which had no effect, and then did a visual studio repair which also had no effect.  The one thing I noticed (which may not be related) is that when adding an SDK item such as a button, the icons that are added to the project have their "Build Action" property set to "Resource" instead of "AddInContent".

The image shows a screen shot of the Properties Window of Visual Studio 2017 

Other than that, there doesn't appear to be any problems with the created classes.

0 Kudos