C# COM Class template for Visual Studio .Net 2005

We are writing .Net classes that will have to be used by COM objects. Therefore, we had to mark our objects with GuidAttribute and implement an interface that match every method we want to expose. In VB.NET Project, there is a COM Class which my colleague friend, Doron really like and is missing in C# Project. I decided to make a “C# COM Class” template so here you go:

C# Com Class.zip (7.92 KB)

Put the zip(don’t extract it!) in: %USERPROFILE%\My Documents\Visual Studio 2005\Templates\ItemTemplates\


1). Open a new instance of VS.NET 2005 and create a new C# Class Library Project.
2). Right-Click on the project -> Add -> New Item…
3). Select C# COM Class.


4). Now insert a name, let’s say: MyClass.


* The namespace will be auto’ generated by the project’s default namespace.



Oren Ellenbogen