O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Prevent Duplicate Entries for Serviced Components

Problem

When you update a serviced component, it’s registered in the COM+ catalog with a different type library and component GUID.

Solution

Specify the version number of your assembly and GUID of your classes using attributes.

Discussion

By default, every time you register a serviced component, a new type library will be generated, and all the classes it contains will be given new GUIDs. This leads to duplicate entries in the COM+ catalog, which can cause significant confusion. Fortunately, resolving these problems is easy.

The first step is to fix the version number of your assembly. Microsoft Visual Studio .NET creates all applications with the following attribute in the AssemblyInfo.vb file:

<Assembly: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required