I have a problem in c# i got this...

i have a problem in c# i got this error: COM Interop registration failed. Could not find a type library for assembly 'SmarTeam.Std.Bom'. but SmarTeam.Std.Bom is not a com object or a type library and doesn;t have no refrence to no com object or tlb. i run the commend regasm /codebase /tlb /verbose and i got this message: RegAsm warning: Registering an unsigned assembly with /codebase can cause your a ssembly to interfere with other applications that may be installed on the same c omputer. The /codebase switch is intended to be used only with signed assemblies . Please give your assembly a strong name and re-register it. how can i solve this problem

Liked this question? Tell your friends about it

4 Answers

Order by
Oldest to Newest
Newest to Oldest
Votes
Staff

You have two problems, or actually, one problem and one half problem (since its a warning from the regasm utility).

The first, "COM Interop Registration failed", is caused due to the fact that in your project settings you have set the "Register for COM Interop" flag which means that upon finishing a build, Visual Studio will try to register this assembly for COM interop. This sometimes fails, usually when you have certain types and interfaces that are not compatible with COM. So, to resolve this, either turn off the "Register for COM Interop" option in your project settings or make sure you have all the necessery attributes that enables a .NET object to be access through COM.

The second problem, with regasm, is not really a problem, but only a warning. When using the /codebase parameter regasm will register your assembly in the registry for COM interop, but will add another entry in the registry near the ProgId and CLSID of the object called codebase which will tell .NET to load that specific dll from the place it was registered.

One of the things .NET comes to resolve is what some people refer to as DLL Hell, which is creates a coupling between the registration of a certain COM object to a specific version. Since .NET supports versioning, and if you want to support side-by-side deployment you can make sure to use an exact version of your DLL by signing it and placing it in the Global Assembly Cache (GAC). When you'll run regasm (this time WITHOUT /codebase) it will not add the codebase entry in the registry but will specify the exact version of the .NET object. When the application will try to load it, it will search for that exact version in the registry, helping you a bit to decouple .NET assembly versions to specific locations. 

I've written a blog post in my blog about how .NET loads an assembly, this will make it clearer how .NET loads an assembly when accessed from COM after it resolves what assembly to load from the registry. 

One must do what one must do

You should try changing the name to: Enovia.Std.Bom. Maybe this will work.

Ordinary People Discovering Extraordinary Abilities <a href="http://notsosmartbuilder.blogspot.com" rel="nofollow">Not So Smart Builder</a>

The previous answer from dudushmaya is totally wrong.

Its a naming convention issue.

The appropriate name is:

Enovia-Smarteam.NonStd.Makes.BomBom

For more explainations, refer to this.

 

Bored with knowledge? Try golf!

have the same problem

<a href="http://www.forgedwheels.org/" rel="nofollow">Forged Wheels</a>

Related Questions

Other people asked questions on similar topics, check out the answers they received:

Asked: What are the step by step instillations and ...

What are the step by step instillations and proceedures to create a C program?

Asked: Is there a way that c5c6c7 implants will be ...

is there a way that c5c6c7 implants will be dislocated again

Asked: Winforms integeration in c#

winforms integeration in c#