ArcGIS 10.1 beta (Specific Version set to false) could not load file or assembly

620
4
10-17-2011 11:53 PM
DavidWilton
Occasional Contributor
I followed the chapter "Migrating ArcGIS 9.3 Desktop and Engine custom components to ArcGIS 10" when upgrading from 9.3 to ArcGIS 10. The ArcGIS Desktop extension works fine in 10, however, in 10.1 beta I get the following error:

ESRIRegAsm::Register
Command line: /e "C:\Program Files (x86)\MyProject\My.Dll"
Registry Capture On.
Registering managed library...
Managed Exception: Could not load file or assembly 'ESRI.ArcGIS.SystemUI, Vers
ion=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its de
pendencies. The system cannot find the file specified.
Registry Capture Off.
Operation Failed
04AC1598**********************************


Version specific is set to false and I have checked that the files exist in the GAC on the client machine. I checked the dependencies for SystemUI and they are System and Version. Both exist in the GAC, although Version is not referenced in my project.

Can anyone help?

Many Thanks


http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Migrating_ArcGIS_9_3_De...
0 Kudos
4 Replies
NeilClemmons
Regular Contributor III
The SpecificVersion property is just a build directive for the Visual Studio compiler.  It causes the latest version of an assembly that can be found to be loaded when you compile.  It doesn't have any effect on your assemblies at runtime.  Your assemblies will require the version of a dependency that was used to compile them.  The exception to this is the presence of a policy assembly for the dependency to point your assembly to a newer version of the dependency.  ESRI did not supply policy assemblies at version 10.  I don't know if this is going to be the case for 10.1 but unless they do you will need to recompile against the newer version.
0 Kudos
DavidWilton
Occasional Contributor
Many thanks Neil, I will try and get official word from ESRI through support. How does that affect service pack versions of the Dlls? Surly we can't ahve to compile against all service packs too?
0 Kudos
NeilClemmons
Regular Contributor III
I'm not exactly sure.  We haven't made the upgrade to 10 yet as we are still waiting on clients.  I've upgraded several of our apps for internal testing.  They were compiled on a machine with ArcGIS Desktop 10 installed with no service packs.  I've installed one of them on a machine w/ SP2 and it appears to run fine.  My guess is that the build number is ignored when determining version (i.e. 1.0.0.1000 and 1.0.0.2000 are both version 1.0.0) but I haven't seen this documented by Microsoft anywhere.
0 Kudos
DavidWilton
Occasional Contributor
Many thanks Neil, I have since been reading up on this. For everyone else here are a couple of links which back up what Neil was saying:

Situation Prior to 10:
http://resources.esri.com/help/9.3/arcgisengine/dotnet/1b2bbc48-1c2c-4096-9970-6cb4abf2a4d7.htm

At Version 10
http://www.esriuk.com/literature/documents/Development%20changes%20in%20ArcGIS%2010%20v3-1.pdf

Policy files removed
Due to the separation changes between ArcGIS Desktop and Engine the policy files
that were installed into the Global Assembly Cache are no longer installed. These
allowed customisations that targeted lower version of ArcGIS Desktop work with
newer versions; the policy files redirected calls to previous ArcObjects assemblies
to the newer versions. As a result of this change all existing .Net code must be
recompiled for this release.
0 Kudos