Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Compiling Multiple Languages into One Assembly

 

One of the main features Microsoft declared about VS.NET was that all the languages are now equal in respect to data types. The Main idea being was that you could write a specifically low level module of your application in C++, while the rest was in C# or VB. And because all the languages were compiled down to this common cls thingy, they are all equal (relatively)

 

I know that VS.NET 2002 did not support this multiple language compiling. Something about the compiler not supporting it yet.

I wanted to know if this is supported in VS.NET 2003 yet?

 

Or is it just a impossible Microsoft dream....

 

Thanks

 

Sam

Edited by samsmithnz
  • *Gurus*
Posted

What they mean is that you can write one assembly in one language and one in another, and interop between them seamlessly, using the same types. You can even inherit a class written in one language with one written in another.

 

The command-line tools also support compiling ONE assembly from sources in multiple languages, but Visual Studio doesn't support it so you'll have to do it manually using the assembly linker (al.exe) tool.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • *Gurus*
Posted
I'm sorry I don't. I haven't ever actually done it, but I think there's an option on the vbc and csc compilers (maybe the c one too) that generates a partial assembly instead of going all the way to exe. You can then link these modules with al.exe.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • 2 weeks later...
Posted

I thought I'd post a follow up to what I've found, I'm sure someone will want to do this again in the future. The keywords here are: multifile assembly.

 

Using these keywords you can find a wealth of information on the internet, including this MSDN article:

 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconbuildingmulti-fileassembly.asp

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...