Deploying a Custom C# GP-Tool on 10.1 Server

3507
17
07-24-2012 12:14 AM
JohannesElsinghorst
New Contributor II
Hi there,

im trying to migrate my 10.0 GP-Services to 10.1
As stated in http://resources.arcgis.com/en/help/main/10.1/index.html#/Deploying_custom_NET_and_C_tools/005700000...
i am supposed to register the dll with 32bit esriregasm as well as with 64bit esriregasm.
The problem im facing here is that the dll references the ESRI.ArcGIS.ADF assembly for the GPFunctionFactories Class in order to register the factory correctly. Unfortunately there is no ESRI.ArcGIS.ADF MSIL oder 64bit version, its only available as x86 in the GAC thus  the 64bit esriregasm fails to register my dll.
Is there anything im missing here or a workaround for this issue?

Thanks,
Johannes
Tags (2)
17 Replies
NobbirAhmed
Esri Regular Contributor
Okay, I tried with  your project and got the same error you are getting. I then looked into the project itself. The project organization kind of complex to me :(. So, I created a greatly simplified visual studio project just using your C# file inside the Tools folder (SleeperTool.cs). I can use this tool in Desktop and am able to publish it to ArcGIS Server and can consume the service without any error.

I have attached my project.

One question, what is the purpose of the AbstractGPTool class? Cannot you derive your SleeperTool class from IGPFunction2 directly as you did for GPFactory class where you derived the class from IGPFunctionFactory?
0 Kudos
KirkKuykendall
Occasional Contributor III
Hi Nobbir -

Thanks Nobbir! that does indeed work.  I may try out why the attached GP tool works in 10.0  but not in 10.1.  If I can't, then I'll need to do some re-architecting. 

Kirk
0 Kudos
VasylMelnychuk
New Contributor
Hi Kirk,

I have faced with the same problem and found solution. I was not able to publish GP Tool in ArcGIS 10.1 (that was working fine in ArcGIS 10.0) till I removed spaces from tool name (I saw in your sample you also have space in name).

I hope this will help for you too.

Vasyl
0 Kudos
BrianCoward
New Contributor II
I've been having this same issue.  Has anyone figured out a solution yet?  The final post on the thread suggested that by simply eliminating the spaces from the tool name would fix the incompatibility.  I haven't had spaces in the folder location of the esriregasm.exe file or the tool name itself.  When the term tool is referred to this means a .dll? 
Any ideas or solutions would be appreciated.  Thanks,
Brian
0 Kudos
NobbirAhmed
Esri Regular Contributor
Hi Brian,

Could you please let us know what error message you are getting? Is the tool running fine on Desktop? Or faililng on both desktop and server?

Can you send me your tool or at least the your code files (as *.zip) at nahmed@esri.com ?

Thanks, Nobbir
0 Kudos
KirkKuykendall
Occasional Contributor III
I've been having this same issue.  Has anyone figured out a solution yet?  The final post on the thread suggested that by simply eliminating the spaces from the tool name would fix the incompatibility.  I haven't had spaces in the folder location of the esriregasm.exe file or the tool name itself.  When the term tool is referred to this means a .dll? 


Eliminating the spaces in my Name fixed one of my problems (Thanks Vasmel!).  (Spaces in DisplayName are ok).

The other problem I had was that when I publish the gp service to a server from a different machine, the factor was not getting registered in the "Esri GeoProcessor Function Factory" category {FD939A4A-955D-4094-B440-77083E410F41}.   To view this, fire up Categories.exe in the bin folder.  I ended up copying the source to the server and re-building there, and running EsriRegasm.exe.

Seems like a bug.  I would expect the gp service publisher to register via EsriRegasm.  (I'm on 10.11).
0 Kudos
NobbirAhmed
Esri Regular Contributor
You need to register the DLL on each machine (with Desktop installed) from where you'll publish the tool.

Also, are you using categories.exe to register the DLL or just to view what's installed?
0 Kudos
KirkKuykendall
Occasional Contributor III
You need to register the DLL on each machine (with Desktop installed) from where you'll publish the tool.

Also, are you using categories.exe to register the DLL or just to view what's installed?


I'm calling EsriRegAsm (x86) to register.  Using Categories.exe only for viewing.
0 Kudos