Can an Addin developed in 10.2.1 work on a 10.2 install?

3190
2
Jump to solution
01-08-2014 01:53 AM
DuncanHornby
MVP Notable Contributor
I've noticed that 10.2.1 is now available and I was wondering how big a difference it is from an ArcObjects perspective?

Could someone from ESRI confirm if I installed 10.2.1 and developed a desktop AddIn could I run it on a 10.2 installation, assuming I'm not using functionality new to 10.2.1? Basically if I recompile an AddIn on a 10.2.1 machine that was originally created for a 10.2 setup would it work on a 10.2 setup?

Duncan
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Frequent Contributor
No, it will not work.

When you link your .NET DLL against the ArcObject assemblies, even if the assembly reference properties explicitly state that it is not version specific, the resulting assembly will embed a reference to the specific version that you built against.  For example, this means that if you referenced say Carto 10.2.1 then the user cannot use this  against 10.2.

.NET, and ESRI, play a trick which does allow you to build against 10.2 and run against 10.2.1.  You can see this by looking at the file:

C:\Program Files (x86)\ArcGIS\Desktop10.2\bin\ArcMap.exe.config

What this does is to redirect older assembly references to the current version.

The best practice is to build your software against the oldest version that you intend to support.  Of course, this assumes that there are no breaking API changes.

View solution in original post

0 Kudos
2 Replies
RichardWatson
Frequent Contributor
No, it will not work.

When you link your .NET DLL against the ArcObject assemblies, even if the assembly reference properties explicitly state that it is not version specific, the resulting assembly will embed a reference to the specific version that you built against.  For example, this means that if you referenced say Carto 10.2.1 then the user cannot use this  against 10.2.

.NET, and ESRI, play a trick which does allow you to build against 10.2 and run against 10.2.1.  You can see this by looking at the file:

C:\Program Files (x86)\ArcGIS\Desktop10.2\bin\ArcMap.exe.config

What this does is to redirect older assembly references to the current version.

The best practice is to build your software against the oldest version that you intend to support.  Of course, this assumes that there are no breaking API changes.
0 Kudos
GusMartinka
Occasional Contributor
I have been developing and building my add in on a machine with 10.2.1 and installing and running the add in on machines with 10.2.0. It works for me. Not sure if it makes a difference but the add in project was originally created on a machine running 10.2.0 before being upgraded to 10.2.1. Also, the ESRI references in the project are set to specific version = false. Now, building on 10.2.x and running on a machine with 10.1.x is another story, that does not work. And in the hopes of saving someone like myself some time, if you need to build a 10.2.x add in project on a 10.1 machine go into the csproj file with a text editor and change (MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.11.targets to (MSBuildExtensionsPath)\ESRI\ESRI.ArcGIS.AddIns.targets
0 Kudos