| Richie 的个人资料The Sandpit - "We hack s...日志列表 | 帮助 |
|
8月1日 How to develop backward compatible ArcGIS application?This post will describe a technique for developing ArcGIS Desktop (or Engine) customizations that are backwardly compatible. Let's say you develop a custom toolbar for ArcGIS Desktop on a computer that has ArcGIS Desktop 9.2 sp4 installed. When that toolbar is deployed to other computers then you may get mixed results. The toolbar will work on computers with 9.2 sp4, 9.2 sp5, 9.2 sp6 and 9.3 but will barf on computers with 9.0, 9.1, 9.2, 9.2 sp1, 9.2 sp2 and 9.2 sp3. Notice that by default all customizations are upwardly compatible. This is because ESRI installs publisher policy files into the GAC so that assembly references are automatically redirected to the current version. But how can you make your toolbar (developed on 9.2 sp4) run on older versions of ArcGIS Desktop? If you want your toolbar to run on 9.2, 9.2 sp1, 9.2 sp2, 9.2 sp3 then you can:
Obviously the first option requires you to maintain a historic version of ArcGIS Desktop. This may be inconvenient and possibly not the most efficient use of a computer. This problem is magnified if you want to deploy a customization that is compatible with older versions like say 9.0 or 9.1. The second option is the best that I have discovered. After the initial setup, it only requires minor changes to your .NET projects. Below I will describe the setup needed to create a customization that supports ArcGIS Desktop 9.2, 9.2 sp1-6 and 9.3. On any computer:
On your development computer:
In your Microsoft Visual Studio projects:
The customizations that you developed on this computer are now backwardly compatible to ArcGIS Desktop 9.2 (no sp) and above. This same technique can be used to create customizations that are backwardly compatible with older versions of ArcGIS Desktop (or Engine) such as 9.0 or 9.1. Due to assembly changes at 9.0, this technique cannot be used to create customizations that are backwardly computer to pre-9.0 versions like 8.1, 8.2 or 8.3. One important considering when compiling against an older assembly is that you cannot take advantage of new features. For example, if you compile a project against 9.1 assemblies then it can be safely run on computers with 9.2 and 9.3 but you will be unable to use new functionality available in those versions. 引用通告引用此项的网络日志
|
|
|