Compiling an Interop Project
COM interop projects that reference one or more assemblies containing imported COM types are compiled like any other managed project. You can reference interop assemblies in a development environment such as Microsoft Visual Studio .NET and compile your project normally, or you can use a command-line compiler. In either case, to compile properly, the COM-derived assembly must be in the same directory as the other project files.
To reference an assembly with a command-line compiler, use the /reference compiler switch (for Visual Basic .NET and C# projects) and the name of the DLL containing the imported COM types.
The .NET Framework SDK provides compilers for Visual Basic .NET, C#, the Managed Extensions for C++, and JScript .NET. For compiler-related instructions, see your language documentation.
See Also
Exposing COM Components to the .NET Framework | What is the Common Language Specification?