Can you mix .net languages within a single project?


Can you mix .net languages within a single project? So pre-compiled, I would like to call classes and methods of other source files.

For both web and apps?

In particular I'd be interested in F# and C#.

10/13/2008 4:01:23 AM

Accepted Answer

You can mix languages in a single assembly with ILMerge and MSBuild.

Here is a very good example about it.

10/13/2008 4:12:39 AM

Exper Answer

CMS mentions an interesting approach, but in reality I would suggest you keep things simple and have different assemblies (projects) for the C# and F# code. There are well documented communication points between C# and F# (such as here and here) - I'd recommend them instead. The differences between C# and F# (especially with F# having a different runtime!) are quite large...

10/13/2008 4:17:00 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow