Hacker News new | ask | show | jobs
by ocdtrekkie 1483 days ago
The compiler won't build a project using multiple languages, it doesn't understand. For a long time, VB code and C# code were 100% interchangeable, and they of course, both compile down to IL. (Identical IL code, in theory, if literally the same code reflected in different languages.) In theory, you would imagine that you could include .cs and .vb files in a single project, and the compiler could link them, but alas, it is not possible.

There's no issues using a library written in one .NET language from another .NET language though, so if you can break the project up a bit more, you can work in multiple .NET languages.

1 comments

The way to get around this is just to have multiple projects - at my employer, we regularly have projects written in C# and F# in the same solution, and depending on one another. That will work just fine.
You can also build a module instead of assembly (=default output of a project) but IDE support for modules is limited. After the modules are generated, an single assembly can be made from them.