visual studio 2015 and ArcGIS 10.4.1

5062
11
Jump to solution
08-11-2016 11:08 AM
YinghongLi
Occasional Contributor

I installed ArcGIS 10.4.1 and VS 2015.  Then I found out there is no Add ArcGIS reference in Reference context menu.  I installed VS 2013 on the same computer.  When I had ArcGIS 10.3.1 installed I had Add ArcGIS reference.  However after I uninstalled ArcGIS 10.3.1 and installed ArcGIS 10.4.1 Add ArcGIS Reference in VS 2013 is lost too.

Please help.

Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
YinghongLi
Occasional Contributor

The sequence of my installation is:; VS 2015;  ArcGIS 10.4.1;  ArcObject SDK Net.  I am using Window 7 professional with sp1.

Now I figured out how to fix the problem.  Here is the steps:

1.  go to VS 2015 menu "Tools | Customize.| Commands".

2.  Select "Context Menu" radio button.

3.   Click drop-down arrow and find "Project and Solution Context Menus | Reference Root"

4.  Click "Add Commend..." button and select "Project" from left panel named "Categories".

5.  From right panel select "Add ArcGIS reference" and click "OK" button.

I assume that the process to integrate ArcGIS and VS 2015 did not go correctly.  I had this problem in both VS 2013 and VS 2015 after I upgraded to ArcGIS 10.4.1  I also spent quite bit time to correct ArcObject references' properties, "Copy Local" and "Embed Interop Types".  Both need to be false but they were not.  The 2nd one does not appear in VS2013/ArcGIS 10.3.1.  Either ArcObject SDKNet installation has a bug or my PC misses some components which caused the installation did not go correctly.

Thanks for the help and hope my experience helps others with the similar problem. 

View solution in original post

11 Replies
KenBuja
MVP Esteemed Contributor

Did you install the SDK for 10.4.1?

0 Kudos
YinghongLi
Occasional Contributor

Yes. The funny thing is that I did not see any of the esri’s objects in the reference window when I opened up a solution from 10.3.1. However I saw the esri objects in the reference list if I created a new project and I still did not see Add ArcGIS reference in the context menu.

Thanks

Ying

0 Kudos
KenBuja
MVP Esteemed Contributor

Strange...I have the Add ArcGIS Reference in my context menu. Do you see the Esri references in the Reference Manager?

0 Kudos
YinghongLi
Occasional Contributor

I reset my project .Net version to 4.5.2. Now all my ArcObject references are good. When I opened Add Reference window and I saw the esri objects in the extensions list. However I still do not see Add ArcGIS Reference menu.

0 Kudos
YinghongLi
Occasional Contributor

The sequence of my installation is:; VS 2015;  ArcGIS 10.4.1;  ArcObject SDK Net.  I am using Window 7 professional with sp1.

Now I figured out how to fix the problem.  Here is the steps:

1.  go to VS 2015 menu "Tools | Customize.| Commands".

2.  Select "Context Menu" radio button.

3.   Click drop-down arrow and find "Project and Solution Context Menus | Reference Root"

4.  Click "Add Commend..." button and select "Project" from left panel named "Categories".

5.  From right panel select "Add ArcGIS reference" and click "OK" button.

I assume that the process to integrate ArcGIS and VS 2015 did not go correctly.  I had this problem in both VS 2013 and VS 2015 after I upgraded to ArcGIS 10.4.1  I also spent quite bit time to correct ArcObject references' properties, "Copy Local" and "Embed Interop Types".  Both need to be false but they were not.  The 2nd one does not appear in VS2013/ArcGIS 10.3.1.  Either ArcObject SDKNet installation has a bug or my PC misses some components which caused the installation did not go correctly.

Thanks for the help and hope my experience helps others with the similar problem. 

KenBuja
MVP Esteemed Contributor

Glad to hear you were able to figure this out. You should mark your answer as correct so that others can find this easier.

0 Kudos
YinghongLi
Occasional Contributor

thanks.....

0 Kudos
YinghongLi
Occasional Contributor

Now it is 2019 and we are about to upgrade to AG 10.6.1 and VS 2017.  After the installation,  i still did not see ArcGIS in the reference context menu.  I used the steps listed above and fixed it.

This time, "Copy Local" and "Embed Interop Types" are set up correctly for ArcObject items.  However the references to JTX objects did not.  I had to manually change them.

When i tried to open up the .cs file in VS 2017 and got "Unrecognized Guid format" error.    I did google search and found the solution.  Below is the list of steps to fix the error:

  1. Type Windows+R on the keyboard to open the Run dialog
  2. Type regedit and press enter
  3. Browse to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
  4. Delete the Visual Studio entry

Full discussion is in the URL below:

https://stackoverflow.com/questions/39885782/how-to-fix-unrecognized-guid-format-in-visual-studio-20... 

Hope this will help.

0 Kudos
StephenKilburn
New Contributor III

I encountered the same problem, slightly different environment (ArcGIS 10.5.1, Visual Studio 2015, Win 7 Ultimate sp1). The solution did not work for me, but manually editing the project files did:

Have a look at How to: Troubleshoot Unsuccessful Visual Studio Project Upgrades. I changed all the references to ESRI.ArcGIS elements in the .vbproj file to Version=10.5.0.0. (My project was created under 10.1 but the version was 10.0.0.0 in this file for some reason.)

Tangentially, I subsequently encountered a problem compiling that led me to this: Error: The ValidateAddInXMLTask task failed unexpectedly...  The link to the Visual Studio redistributable in that is no longer valid, but I found the file for download here: Visual Studio Shell Redistributable Download.

I hope this helps someone.