| Message |
Here's what I've come up with to deal with my application deployment issues.
I never include ESRI assemblies in my install package. They should already be on the target machine by the time your application is installed.
I typically include the stdole assembly when it's required. Something to do with fonts (ie. annotation and labels) requires that the Microsoft primary interop assembly is installed in the GAC. My guess is that ESRI's assemblies, probably Carto and some others were built against the stdole assembly. It's safest to just go ahead and have your install package ensure that it is in the GAC.
I like to include the Microsoft redistributable .Net Framework package with my installers. It saves the client the trouble of downloading it.
I've found that versioning issues are easiest to deal with if I don't have any ESRI service packs installed on the development/build machine. By doing this, my assemblies are more or less ensured forward compatibility with the 9.0 series ESRI assemblies. Unfortunately, once you've installed a service pack, the only way to remove it is to uninstall and reinstall ArcGIS from the source disk. The reason this method works is that with each service pack ESRI releases, new assembly binding policies are added to the GAC that enforce usage of the newest versions of the assemblies. Since my assemblies are built against the original published versions of ESRI's ArcObjects assemblies, they will in turn be redirected by the binding policies to the newest versions. If you build your assemblies against a service pack version, that service pack or higher will be required on any target machines for your application, a feature that is not alway guaranteed. You may be able to keep the service packs on your development machine if you know how to setup your own compiler scripts to bind your assemblies to specific versions of ESRI's (haven't tried it yet). Research .config files and binding redirect for more ideas on how to customize version binding.
When installing on the target machine, certain prerequisites must be met:
1. Must have .NET Framework installed (duh!) Do this first.
2. Must have ESRI's ArcObjects primary interop assemblies installed. I have a feeling this is where some people go wrong. The client should insert thier ArcGIS 9.0 disk and either install ArcGIS for the first time or to modify the existing installation. Go into the customize installation and ensure that .Net options are included for installation. These options will not be available if .NET Framework is not installed (goto step 1). If Framework was not present during original installation, .Net support was not installed. Also, if .Net support wasn't installed, it won't be corrected by simply installing a ArcGIS service pack, I've tried it.
3. Install or reinstall the latest ESRI service packs. Even if you have already installed them, if the .NET support was not installed at that time, it now needs the service pack again.(jeez, this can take a long time!)
4. Check the GAC, make sure that the ESRI primary interop assemblies are present. If you've installed service packs, you will have multiple of each assembly with different version numbers as well as binding redirect policies.
5. If everything went OK, you should be in good shape to install your application.
I hope all this info helps, let me know if you find less time consuming methods to get everything to work. |