Hi Ying-Shen,
thanks for the replay.
I have resolved the problem. It seems that this is problem with VS.Net
2003. I have tried to restart it, but the problem persisted.
Then I fired regedit, and in HKEY_CLASSES_ROOT I found my assembly
exposed more than 20 times, some of the keys were directed to the non-
strong named (previous) assembly. Most probably this caused the problem.
I manually deleted all the keys and typelib entries, and after that
everything started to behave as it should be.
But in that regard, I have another question - how to unregister
assemblies, registered by the IDE, when I stop work with them. For now
IDE does not unregister them. If I start with new projects, etc., the
previous assembly registration are left in the registry, even I do not
need them any more - I.e. I have finished the project, I have installerr
package ready, and I really would like to have "clear" machine for the
next project.
Is there a way to tell IDE to unregister the stuff when I'm finished
with it?
Thanks
Sunny
> Hi Sunny,
>
[quoted text clipped - 20 lines]
> This mail should not be replied directly, please remove the word "online"
> before sending mail.
Ying-Shen Yu[MSFT] - 12 Jun 2004 08:58 GMT
Hi Sunny,
I also suspect the VS.NET is still using the non-strongnamed assemblies,
that's why I suggest you restarting the IDE, since it did some cache inside.
In your reply, you said you found 20+ exposed assemblies in registry, did
you specify Guid attribute for all of the exposed interfaces and classes?
If not, this might cause the problem, when register the assembly for COM
interop, the exporter will generate a Guid for COM visible interfaces and
classes automatically, since the auto generated Guid would be different in
next build time, exporter generated a new entry for the new GUID, this also
causes the exporter register a new type library for this compnent.
You need add Guid attribute for every COM visible interfaces and types. This
could reduce the entry count to one entry, as I know IDE doesn't not have an
option to unregister an assembly, but you can use
regasm /u <filename> /tlb:<tlbfilename>
to do this.
Does it resolve your problem?
Thanks!
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
Sunny - 13 Jun 2004 15:21 GMT
Hi Ying-Shen,
I just can't belice that I missed something so obvious. Thanks for directing
me. I had to add some GUIDs :)
Thanks again
Sunny
> Hi Sunny,
>
[quoted text clipped - 27 lines]
> This mail should not be replied directly, please remove the word "online"
> before sending mail.