jprealini
jprealini

Reputation: 369

Problem creating COM assembly in C# 2005

I am kind of new to C#. I built a class library in order to create a DLL which I need to reference from a VB.Net application.

I followed all the steps detailed in this this article in order to generate the COM assembly based on my C# class library.

All the process ran smoothly (create the key, run gacutil.exe to add the assembly to the cache), but I still can't see the DLL from my main project in order to add it as a reference.

What am I doing wrong? Any help will be appreciated

Upvotes: 0

Views: 62

Answers (1)

Hans Passant
Hans Passant

Reputation: 942178

There's some pretty bad advice in that article, the GAC is a deployment detail and has no relevance to the task of writing and using an assembly on your dev machine. The entire process also has nothing to do with COM at all.

Get ahead by opening your VB.NET solution in Visual Studio. Right-click the solution in the Solution Explorer window, Add, New Project. Pick "Class Library" from the C# node. Now right-click your VB.NET project, Add Reference, Project tab and select your C# project. Any of the public C# classes you write are now available in your VB.NET code.

You might not see the solution if it contains only one VB.NET project. Fix with Tools + Options, Project and Solutions, General, tick "Always show solution".

Upvotes: 1

Related Questions