Upgrade Add-in project to Visual Studio 2012

2602
3
08-28-2013 07:49 AM
New Contributor III
Was using Visual Studio Express 2010 with 10.1. With upgrading to 10.2 also moving up to VS Express 2012. But when I open a add-in projected in VS Express 2012 and try to debug the add-in does not get installed.

I updated the options file to point to the 10.2 exe so ArcMap opens when Start Debugging is run. Also updated target version in the config file.

Creating a new add-in project in VS and running debug starts up arcmap and installs the add-in. So I assume there is just some setting somewhere I need to update in my old add-in projects to get it to install when debugging.

Thanks

Michael Nelson
Reply
0 Kudos
3 Replies
by
New Contributor III

Hi Michael.  Did you ever figure this out?  I am having a similar issue.

Reply
0 Kudos
New Contributor III

When migrating an Add-in project from VS 2010 to VS 2012, you will need to make a small change to your *.csproj file in VS 2012.

1- Open your Add-in project in VS 2012. Then, unload the project by right-clicking the project folder (in Solution Explorer), and selecting "Unload Project." This will expose the *csproj file. 

2- Open the *.csproj file by right clicking it and selecting "Edit *.csproj".

3- In that project file, search for an XML attribute value: "ESRI.ArcGIS.Addins.Targets"

Import Project="$(MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.targets"

    Condition="Exists('$(MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.targets')" />

...

...

Warning Text="Unable to create .esriAddin; missing ESRI ArcGIS Add-in SDK component(s)." Condition="!Exists('$(MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.targets')" />

4- Change this attribute value to "ESRI.ArcGIS.Addins.11.Targets". Basically, you need to insert "11" somewhere in this attribute value.

5- This XML attribute value appears in 3 different places (as shown above) in your *.csproj file; make the change in each.

6- Search for the tag below and update the target version from 10.1 to 10.2:

    AddInTargetVersion>10.1</AddInTargetVersion>

6- After making the above changes, Save your project file and close it.

6- Re-load your project by right clicking the project folder and selecting: "Reload Project."

7- Open the Config.esriaddinx file and update the target version from 10.1 to 10.2.

Target name="Desktop" version="10.1" />

8- Build and run your project in debug mode. Upon Building, the Add-in should install correctly, and upon running, you should be able to consume it successfully in ArcMap/ArcCatalog.

New Contributor III

Thank you for posting this. I reinstalled my entire dev environment trying to fix this error and of course I still had the error. This fixed it. I am sure this needs added to a help page on ESRI's documentation. There is nothing in there that would help you find out how to do this. Did you find this out from customer support?

Reply
0 Kudos