I am currently trying to build an ESRI Addin that supports multiple versions of ArcGIS (10.0 & 10.1). The project targets .net framework 3.5 and is built in the ArcGIS 10 environment. The referenced ESRI dlls are set to specific version false. The addin works correctly within both versions of ArcGIS.
With the addin we are also shipping geoprocessing tools created in the .net environment (KBFunctionFactory & IGPFunction2). The tool builds and functions correctly within the different versions of ArcGIS (once registered with ESRIRegAsm). However, when background processing is turned on the tool returns error “000816: The tool is invalid”
Looking in to the error it suggested that it could be related to 64 bit processing. I have experimented with building the dll for 64 bit but it makes no difference, the same error still occurs. I do not currently have 64 bit processing installed and to keep things simple let’s assume I am not looking to support 64 bit processing.
Edit: when compiling the dll any CPU following the above article and trying to register on the 10.1 machine it fails to create the registry file. No error, esriregasm.exe just says it failed. Creating the reg file on the 10.0 machine and adding this to the 64 bit registry does not work either.
I have tested building the dlls on a 10.1 machine with the .net 3.5 framework and the tool functions fine in 10.1. It does therefore not seem to be related to the .net 3.5 framework. As the tool works in foreground mode it would seem that it is not an ArcObjects version issue.
My questions are:
- Should it be possible to create a .net geoprocessing object to target multiple versions of ArcGIS 10 with background processing?
- What in the background processing framework makes the tool invalid when moving from 10.0 to 10.1?
- If it is not possible to target multiple versions how using ArcObjects could I disable background processing on the tool? See for example the “ESRI Metadata Translator” which runs in the foreground even if background processing is enabled
EDIT: Thanks to all that helped answer, in particular @KHibma. In review to these questions:
- ESRI say this is not supported here. Our research seems to find that everything works so far except background processing
- I still don't have an answer to this. It does not work with either 32bit or 64bit processing so it does not seemed to be related to this.
- It is possible to disable background processing at 10.1 using the new interface. It is not possible to do this at 10.0