473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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/archiv...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
Jul 21 '05 #1
1 2701
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

"Asim Jalis" wrote:
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/archiv...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

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
I am trying to build a single component assembly from a .vb file. At the command prompt, I try to use the "vbc" command as described in the .Net help files and get an error message that the "vbc"...
3
by: DrSarang | last post by:
While building XmlSampleGenerator code from MSDN, I get missing XmlSchemaSet reference. Here is the screen dump, if needed. C:\Documents and Settings\Dr Sarang\My Documents\MSDN\XML Sample...
1
by: Asim Jalis | last post by:
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...
5
by: Peter Rilling | last post by:
Okay, the other day I was talking with someone about assemblies. He said something that I am not really sure about. He said that a DLL or EXE can contain more then one assembly (although the IDE...
5
by: wl | last post by:
Hi, I've been using ASP.NET in the paset and was succesful in uploading it to my hosting account. I compiled the assembly of each project to the single BIN directory of my hosting account (the...
3
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
0
by: roger23 | last post by:
I get this error C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(526,9): error MSB6006: "aspnet_compiler.exe" exited with code 1. at the end of my build...
1
by: archana | last post by:
Hi all, I am confuse regarding concept of code behind model and single file model.. I have heard that single file model compiles dynamically. suppose i have application in which i am having...
12
by: Ludwig | last post by:
Hi all, we are building our own class library framework, with stuff in it that can be used in various projects at various clients. Initially we had 4 assemblies with everything in it. Of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.