Link to home
Start Free TrialLog in
Avatar of malramsay
malramsay

asked on

Unbuilding myCOMAddin (V. Easy!)

Hi,

I'm totally new to .NET and I built the Microsoft MyCOMAddin from here,

http://support.microsoft.com/?kbid=302901

After selecting "Build > Build Solution" the addin now puts a message box up whenever I open or close a Office app.

Ok, this is so easy that I'm almost embarrased asking it, but how do I 'unbuild' this app?  I can't find the answer to that anywhere, and the Microsoft docs only cover the build, not unbuild!

Thanks!

ASKER CERTIFIED SOLUTION
Avatar of krznpsk
krznpsk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of krznpsk
krznpsk

additionally, to completely unregister MyCOMAddin as a COM dll, run this:

regsvr32 /u myAddIn.dll
Avatar of malramsay

ASKER


Thanks for your help.

I'm still trying to understand how .NET works, as I've only created dll's in VB6.0 before.  Are you telling me that even though .NET can build and register COM dlls itself, the only way to unregister it is to do it manually in 'regedit'?  That doesn't seem very sensible (or am I off the mark here)!??

Also, I tried the regsvr32 command and it told me that the 'specified module could not be found'.  Where does .NET save these dlls? I'm unsure why this command isn't working, as surely the dll would have to be registered for the popup to continue working?
Not exactly... but since Office XP is based on COM, Visual Studio .NET provides that wizard for building and deploying what they call "COM interop assemblies."  MSDN article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp

Actually, .NET assemblies are designed to be placed somewhere else, in what's called the Global Assembly Cache.  This is not the registry... check out gacutil.exe, available from the Visual Studo .NET command Prompt or at C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\gacutil.exe

gacutil -l will give you a list of registered .NET assemblies in the GAC.  The GAC is equivalent to how COM used the registry to register user-wide or machine-wide assemblies (as opposed to just copying the .dll's around).

You can read about the GAC here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconWorkingWithAssembliesGlobalAssemblyCache.asp
oh, by the way, the .dll is most likely at this path on your computer:

C:\documents and settings\%USERNAME\My Documents\Visual Studio Projects\MyAddin\MyAddin\bin\MyAddin.dll


Thanks, I see I have a lot of reading too!