Wednesday 19 September 2018

arcobjects - How to compile an ArcGIS Desktop add-in in Visual Studio 2013


I have several projects made in Visual Studio 2010, those projects are ArcGIS Desktop Add-in's. I have been change of computer, and my new one only have Visual Studio 2013 due to some company politics I'm not allowed to install VS2010.


I tried to open this projects in VS2013, and they open with no problem, but when i try to compile it, it get me the following issue:



ESRI.ArcGIS.AddIns.SDK, Version=10.2.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86. Could not load file or assembly 'Microsoft.VisualStudio.Shell.9.0, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.




my research so far has get me to install the VS SDK, but I'm not quite sure about which one(2008...2013)


Any one has any possible solution for this?



Answer



First, I check that Microsoft.VisualStudio.Shell.9.0 was in the GAC, It was not there... :( then I proceed as Juho Vainio in Geonet suggest : Visual Studio Command Prompt --> Run as Administrator --> gacutil /i Microsoft.VisualStudio.Shell.9.0.dll, but it failed because I was not giving the full pat of the dll, so I search for it in the Visual Studio 2008 SDK, and Voila!!! it appear in the GAC enter image description here


but the project still does not compile, so, I chec in the real GAC:


C:\Windows\Microsoft.NET\assembly


and found that the file does not exist neither in the GAC_32, nor GAC_64 folder, moreover, it exists in the folder GAC_MSIL, so....i took the folder C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Shell.9.0 and copied it to the folders GAC_32 and GAC_64.


Now the project compiles.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...