[GIS] Deploying ArcObject .NET DLLs

arcobjectsinstallation

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?

Update:

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 *

Best Answer

In 9.x, you could install ArcGIS with .NET support which IIRC included the .NET PIAs, however in 10.0 you have to install the SDK: http://support.esri.com/en/knowledgebase/techarticles/detail/34178 -- See @Petr's answer, the .NET PIAs are installed into the GAC when you install ArcGIS Desktop 10.

According to this page, Visual Studio is not required to install the ArcObjects 10 SDK -- but that's NOT correct as the installer refuses to continue without a supported VS IDE installed.

If you use comtypes you could use the COM OLBs instead of the .NET PIAs. Of course you would still have to install comtypes or deploy it with your script (not sure how but I think it can be done), but it would eliminate the .NET assembly dependency.

See also related questions: