Unregister an assembly?
-
I want to unregister an assembly from within a csharp app. Basically all I want to is the exact same thing as: regasm.exe /unregister (path to assembly) only from within my app. (The assembly I'm unregistering is not the app running it, it's a different assembly.) Also, I want to know how to register it again later, same as: regasm.exe /codebase (pathtoassembly) (I think what I'm stuck on is creating an "Assembly" class instance, since there's no constructor that just takes a file path as an arg. ) thanks "Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read." -Groucho Marx
-
I want to unregister an assembly from within a csharp app. Basically all I want to is the exact same thing as: regasm.exe /unregister (path to assembly) only from within my app. (The assembly I'm unregistering is not the app running it, it's a different assembly.) Also, I want to know how to register it again later, same as: regasm.exe /codebase (pathtoassembly) (I think what I'm stuck on is creating an "Assembly" class instance, since there's no constructor that just takes a file path as an arg. ) thanks "Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read." -Groucho Marx
Under the
System.Diagnostic
namespace you will find a class calledProcess
which contains a static method calledStart
which takes a file name as a parameter and your args as a second parameter. Something like this should do the trick:Process.Start(@"c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat",
@"regasm.exe /unregister [path to your file] /silent");-Nick Parker
-
Under the
System.Diagnostic
namespace you will find a class calledProcess
which contains a static method calledStart
which takes a file name as a parameter and your args as a second parameter. Something like this should do the trick:Process.Start(@"c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat",
@"regasm.exe /unregister [path to your file] /silent");-Nick Parker
thanks, Ok, I knew this already actually, but I was hoping I could register an assembly from within dot net, like with the RegistrationServices class? Are you saying that I need to include regasm.exe in my installer for the application when it's deployed? It's a shame, tha seems kind of hackish.. "Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read." -Groucho Marx