Building a Single Assembly EXE or DLL with C# and C++ Code

A

Asim Jalis

Building a Single Assembly DLL with C# and C++ Code

I am trying to create a single assembly composed of managed C++
and C# code, and I want to do this on the command line.

I have confirmed that I can do this in Visual Studio 2005 using
the steps described here:
http://blogs.msdn.com/frankpr/archive/2004/07/27/198918.aspx

Question: How can I do this on the command line? What is Visual
Studio doing behind the scenes to create a single file assembly?

Here is what I have done so far:

1. Create a C# netmodule.

2. Compile managed C++ using cl.exe and reference the netmodule
to it using the "using" directive in the code, and the /AI
option.

However, this creates a multi-file assembly. I end up with an exe
and a netmodule, and I need to deploy both, for the exe to
function.

What does Visual Studio do to create a single assembly out of
this?

Any ideas?


Asim
 
G

Guest

why not try using Module for doing that. Compile your code in Module and then
add this module to other assembky written in different language. Module are
the best way to create a single file assembly comprising of codes from
multiple languages..

regards
Nishith Pathak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top