Are assemblies built at the project level?

  • Thread starter Thread starter Jeff Johnson [MVP: VB]
  • Start date Start date
J

Jeff Johnson [MVP: VB]

Basically, my real question is "Can an assembly house code from multiple
languages or must each assembly contain code from only one language?" I
would like to create a single assembly that has code from a C# project and
also from a VB project. Impossible?
 
As far as I am aware, you cannot use multiple .NET languages in a single
assembly.

Antony.
 
Basically, my real question is "Can an assembly house code from multiple
languages or must each assembly contain code from only one language?" I
would like to create a single assembly that has code from a C# project and
also from a VB project. Impossible?

Pretty much. You can mix "modules" from different languages into an
assembly -- but you won't have one physical assembly. You'll have an
assembly file that defines an manifest only, and then each compiled
module file. "Module" is a target type available to the command line
compilers -- I'm not sure if you can create modules from VS.NET.
 
Patrick Steele said:
Pretty much. You can mix "modules" from different languages into an
assembly -- but you won't have one physical assembly. You'll have an
assembly file that defines an manifest only, and then each compiled
module file. "Module" is a target type available to the command line
compilers -- I'm not sure if you can create modules from VS.NET.


You can build a module in a C++ project because you are allowed to specify
the command line. Unfortunately, other languages hide the command line, and
only offer a subset through the property pages, they don't offer
/target:module as an option. If you want to have a project with multiple
modules they you can create a Makefile project, but of course that means
that you must deal with makefiles (and that really defeats the idea of
having a project!)

Richard
 
Back
Top