I am using several ESRI .NET DLLs in some custom Python scripts. For example ESRI.ArcGIS.Geodatabase.dll
On my development machine these DLLs are in the C:\Program Files (x86)\ArcGIS\DeveloperKit10.0\DotNet folder.
Now I wish to deploy the scripts to another machine. However unless the user has the ArcObjects SDK for .NET installed these DLLs are missing from their machine.
Even worse, requesting that the user install the SDK, means they also need to install Visual Studio, which is a 600MB download (for the free Express version). If they don't have Visual Studio the ESRI installer won't continue.
So should these DLLs be bundled up with the scripts (which may cause compatibility issues if service packs are added), or is there an easier deployment method?
The .NET DLLs are now installed by default in version 10 of ArcGIS. They are placed in the GAC (Global Assembly Cache). You can see them in Windows Explorer (in Windows 7) in
C:\Windows\assembly (not really a folder, but you can view what is in the GAC). Looking at the assembly properties indicates the DLL should be in a folder such as
C:\Windows\assembly\GAC_32\ESRI.ArcGIS.System\10.0.0.0__8fc3cc631e44ad86\ESRI.ArcGIS.System.dll but this file does not seem to exist.
Python for .NET seems to now require you use the full name when adding a reference to these DLLs. Looking at its sourcecode it looks like it previously used LoadWithPartialName so you before you could use the code below. This now returns a FileNotFound exception.
import clr clr.AddReference("ESRI.ArcGIS.System") from ESRI.ArcGIS.System import *
Now it seems you need to use the following:
import clr clr.AddReference("ESRI.ArcGIS.System, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86") from ESRI.ArcGIS.System import *