Reply

Solid Edge Libraries being Uninstalled

[ Edited ]

 

Hi all,

Am looking for some help with setting up my VB 2008 Add-In for Solid Edge.  At the moment it installs fine, runs fine and uninstalls fine, except when it uninstalls it takes with it the solid edge copies of the libraries that it references from the Solid Edge Directory and yet leaves the copies in the Addin directory.  It also seems to unregister them.  I would like to be able to leave the SE directories as they were and the COM registration...

The libraries are referenced under My Project, References as a COM object, with the options being Copy Local - True and Isolated - False.

In the Deployment Project under Detected Dependencies the Options are:

for *.TLBs (added automatically from the references)

Exclude - False, Folder - Application Folder, Hidden - False, PackageAs - Default, Permanent - False, ReadOnly - False, Register - vsdrfCOM, SharedLegacyFile - False, System - False, Transitive - False, Vital - False

for *.dlls (added automatically from the references)

Condition - blank, Dependancies - (Dependancies), Exclude - False, Files - (Files), Folder - Application Folder, Hidden - False, ReadOnly - False, Register - vsdraDoNotRegister, SharedLegacyFile - False, System - False, Vital - False

I feel that it is one of these settings however can't seem to work out which one.  Can anyone assist?

 

Posted by: Tom Harris
Post date: 1/26/2010 12:29:52 PM

1 REPLY

RE: Solid Edge Libraries being Uninstalled

[ Edited ]

Not sure I understand all of that as I have not worked with deployment. However, you should be building your add-in by referencing the solid edge .tlb files. Never reference the "interop" assemblies in the edge directory. You should be getting a "copy local" copy of each interop DLL and they should be in your bin directory with your addin server (DLL).

 

You should never install your add-in into the Edge program directory if that is what you are doing. Instead, you should be registering your addin using the "/codebase" option and installing it into its own setup directory.

 

Alternatively (I have not personally done this), you can sign your assembly and install it into the Windows GAC. Edge should then be able to use COM to CoCreate your add-in. I always just used the /codebase option of regasm.exe when generating my .reg file. The registry might "warn" that that is dangerous. I guess they think it can lead to DLL hell, which in my opinion is not much better than "where in the hell do I put my DLL" or "where in the hell is my DLL" hell.

 

I use

 

regasm.exe /regfile:myaddin.reg /codebase myaddin.dll

 

to generate a .reg file. An msi install guru takes that file and does the magic that creates an install program. Since your DLL and all dependencies are totally ignorant of edge (and vica versa), there should be no issue with uninstalling (of either program).

 

Posted by: R.D. Holland
Post date: 2/3/2010 8:37:11 AM