Microsoft KB Archive/311034

= PRB: Multiple Entries for Same ServicedComponent Class in Component Services Explorer =

Article ID: 311034

Article Last Modified on 3/20/2002

-

APPLIES TO


 * Microsoft Visual Studio .NET 2002 Professional Edition

-



This article was previously published under Q311034



SYMPTOMS
You may notice that multiple versions of the same ServicedComponent class exist in the Component Services Microsoft Management Console (MMC) snap-in. The programmatic identifiers (ProgIDs) of the ServicedComponent are identical, although the class identifiers (CLSIDs) differ.



CAUSE
Every time you change the ServicedComponent assembly, the version of that assembly changes. Furthermore, when you register the dynamic-link library (DLL) dynamically, the CLSID changes. This creates multiple entries of the ServicedComponent with identical ProgIDs but different CLSIDs.



RESOLUTION
To resolve this problem, use one of the following methods.

Method 1: Change the Version of the Assembly
Change the version of the assembly in the AssemblyInfo.cs file from [assembly: AssemblyVersion(&quot;1.0.*&quot;)] to a fixed number, such as: [assembly: AssemblyVersion(&quot;1.0.0.5&quot;)]

Method 2: Change the CLSID of the Class
 Add a reference to the System.Runtime.InteropServices namespace.  Add the Guid attribute before the class declaration. For example: [Guid(&quot;12345678-ABCD-EFGH-IJKL-123456789012&quot;)] 



STATUS
This behavior is by design.

Keywords: kbcomservices kbprb kbcompluscatalog KB311034

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.