AnsweredAssumed Answered

How do you build and ArcObjects stand alone application to run on ArcGIS 10.0, 10.1, and 10.2 without rebuilding for each version?

Question asked by oraclenms on Jul 13, 2015
Latest reply on Apr 20, 2018 by ticheler

I have an ArcObjects 10.0 VB.Net stand alone application I built and want to install on various ArcGIS system at different release levels, 10.0, 10.1, 10.2, ... I am able to compile on each version and run only on that version but I would like to compile once and be able to install and run on all versions. When I run on a version (10.2) not matching the compiled version (10.0), I get an error: Error encountered in frmMain.Load #53 - Could not load file or assembly 'ESRI.ArcGIS.Version, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified."

 

I have tried compiling on 10.0, 10.1, and 10.2 and I get the similar error (just change the message to Version=10.0.0.0 or Version=10.1.0.0 or Version 10.2.0.0) when I run on a different version.

 

 

I looked at the ArcGIS 10.2 ESRIRegsm.exe.config file and it looks like there is an attempt to map older version requests to the latest installed version:

 

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <dependentAssembly>

    <assemblyIdentity name="ESRI.ArcGIS.Version" culture="" publicKeyToken="8fc3cc631e44ad86"/>

    <bindingRedirect oldVersion="9.3.0.0-10.1.0.0" newVersion="10.2.0.0"/>

  </dependentAssembly>

</assemblyBinding>

 

But that does not appear to be working???

 

Is it possible to compile once and run it on all version of the major release (ie 10.X)? If so, can you send me some instructions on how to do this?

Outcomes