Book a Demo

Author Topic: Deploy Add-Ins  (Read 7191 times)

vita

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Deploy Add-Ins
« on: January 08, 2009, 04:40:17 am »
Hi, i'am a new user and i use C# create Add-Ins but i have some  to the Deploy Add-Ins, i want to register My DLL using regsvr32 command   but follwing the step , is not possible.
how cam i do?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Deploy Add-Ins
« Reply #1 on: January 08, 2009, 09:20:44 am »
Try using regasm.exe instead of regsvr32. That usually clears up the problem.

Let us know if that works.
No, you can't have it!

lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Deploy Add-Ins
« Reply #2 on: January 08, 2009, 05:44:26 pm »
I use the following command

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe  EAPlugins.dll /codebase /regfile:EAPluginsCOM.reg

that creates the EAPluginsCOM.reg file that I use to deploy it on any computer (we have the DLL in the same path on all computers)

vita

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Deploy Add-Ins
« Reply #3 on: January 09, 2009, 01:19:43 am »
thank U  for your answers , when i  run this command to register  i have this error:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm.exe ActiveX.dll/codebase/regfile:ActiveXCOM.reg
Utility of registration assembly to Microsoft (R) .NET Framework  2.0.50727.305
3
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

RegAsm : error RA0000 : The format of the specific distance is not supported.

can u help? what is code base?


lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Deploy Add-Ins
« Reply #4 on: January 09, 2009, 06:25:55 pm »
/codebase

Creates a Codebase entry in the registry. The Codebase entry specifies the file path for an assembly that is not installed in the global assembly cache. You should not specify this option if you will subsequently install the assembly that you are registering into the global assembly cache.


As I understand it I has to be used whan the component is not installed in some global repository.
I don't understand the .NET deployment proces in detail .. what I have written is just what become to work in our environment .... so I cann't tell you where the problem is ... do you have the latest .NET framework? Or maybe some problem in the code ?  ..Sorry

djm97

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Deploy Add-Ins
« Reply #5 on: February 09, 2009, 12:32:09 pm »
I'm having similar issues.  Doesn't help that I'm primarily a Java guy and new to .NET / C# and deploying on Windows.

I'm using Visual C# 2008 Express Edition to create an EA Add-In.  Nothing fancy, just a simple test based on the CS_AddinFramework example to get things working.

I'm able to build .dll and register it using RegAsm.exe.  I get the following message when running RegAsm:
  Types registered successfully

So I assume that part worked.

I have a number of different versions of the .NET framework installed on my computer, so I'm using the latest one that has the RegAsm executable in it.  Also, I moved the .dll file I built in MS VC# from the bin/Release directory to a different local directory on my machine before registering.  Is there any significance to where this file resides? Are there other files than need to be in the same directory. Do these files have to be deployed to a certain directory or be in some path?

Next I register the AddIn using RegEdit.  I create a new entry under 'HKEY_CURRENT_USER->SOFTWARE->Sparx Systems->EAAddins'.  I used 'SDTools.Main' for the Value Data.  Which is '<project name>.<class name>'.  SDTools is same name used for my AssemblyTitle, AssemblyProduct and namespace.  Main is a public Class in that namespace.

Next I startup EA and go to the Addin Manager.  I see my Add-In as an Available Add-In, but the status is 'Error - Missing'.

What does this mean?  Anyone have an idea what I did wrong?  Are there some better resources? Documentation? Examples? Debugging tools?  Error logs?

I'd really like to get this working.

Thanks in advance,

Doug

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: Deploy Add-Ins
« Reply #6 on: February 09, 2009, 01:48:11 pm »
An 'Error - Missing' message usually means that EA has found the registry key for a type library, however the corresponding DLL cannot be found on path that the registry key provides.

Have a look in the registry under HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins and find the entry for your addin. The do a search for its corresponding REG_SZ entry (SDTools.Main).

There should be a corresponding entry in HKLM\SOFTWARE\Classes\CLSID, have a look at its InprocServer32 subkey and verify that the paths that it mentions are correct.

If that doesn't work, I'd suggest downloading the SysInternals Suite ProcMon, which will allow you to identify which registry reads or dll loads are failing.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

djm97

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Deploy Add-Ins
« Reply #7 on: February 09, 2009, 03:21:26 pm »
Michael,

Thanks for the quick response.  You are definitely on to something.  I didn't find any entries in the registry for my dll, so I added it in a couple places.  Still didn't work.

So on your advice,  I ran ProcMon and found lots of log entries with result 'NAME NOT FOUND' related to my entry and CLSID.  Wasn't able to get much beyond that.  I assume I'm doing something wrong when I run RegAsm.  I noticed one of the other Add-Ins had an entry in the registry for CodeBase and it looks like this is something RegAsm can do for you.  Should I be specifying this when I run RegAsm?  Any other ideas?

Didn't realize this was going to be so painful.

Thanks again,

Doug

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: Deploy Add-Ins
« Reply #8 on: February 09, 2009, 03:35:31 pm »
:o Are you running under Vista? If so remember to make sure you open up your command prompt in elevated mode!

Other than that, I'd have to take a bit more of a look into it (I'm more of a Java person myself, and haven't done heaps with RegASM either). If you could send in a bug report with the logs of ProcMon attached, I'll see what I can find.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8