>I'm guessing, this may not be the right news group for this question?
>Can someone recommend the right news group?
The group is fine. But I can't reproduce the problem, the key gets
deleted without any exception being thrown here. Can you put together
a short example that reproduces the problem you're seeing?
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
aaronfude@gmail.com - 11 Aug 2005 16:24 GMT
Hi, thanks for the answer.
Your response prompted me to put a couple of printing statements into
my method. I realized that what's happens is that the method is called
twice (which explains it).
Why it is called twice is not a mystery. Here's the excerpt from Main:
Assembly asm = Assembly.GetExecutingAssembly();
RegistrationServices reg = new RegistrationServices();
if (unregister) {
System.Console.Error.WriteLine("About to call
\"UnregisterAssemply\"");
reg.UnregisterAssembly(asm);
System.Console.Error.WriteLine("About to call \"Unregister\"");
CleanVS.UnregisterServer("");
System.Console.Error.WriteLine("Done calling \"Unregister\"");
}
and I learn that CleanVS.UnregisterServer is called automatically from
reg.UnregisterAssembly(asm) and then by me manually? Voila.
But is this defined behavior? Should I just comment out
CleanVS.UnregisterServer("")? Once again, this is not my code, but
something I found at
http://www.informit.com/articles/article.asp?p=169474&redir=1&rl=1
Thanks for responding and thank you very much in advance,
Aaron Fude