This is question is inspired by the question: In what areas does F# make "absolute no sense in using"?
In theory, it should be possible to use any .NET supported language in a single project. Since every thing should be compiled into IL code, then linked into a single assembly.
Some benefits would include the ability to use say F# for one class, where F# is more suited to implement it's function, and C# for another.
Is there some technical limitation I'm overlooking that prevents this sort of setup?
To do so: Choose the Language packs tab in the Visual Studio Installer. Select the language you prefer. Follow the prompts.
Once the installer is launched, click on Modify to modify the current installation of Visual Studio. 3. Then, you'll want to click on the Language Packs tab and select the language pack that you wish to install.
JavaScript. The JavaScript editor in Visual Studio supports EcmaScript 6 and has the most advanced IntelliSense engine on the market. JavaScript is a first-class language in Visual Studio.
You can change this by going to the project property page (right click Properties) and change the Output Type combo box. It is possible to have other project types supported by the project system but they are fairly few and are not definitively associated with a project template.
A project is restricted to a single language because, under the hood, a project is not much more than an MSBuild script which calls one of the command-line compilers to produce an assembly from the various source code files "contained" in the project folder. There is a different compiler for each language (CSC.exe is for example the one for C#), and what each project has to do to turn its "contained" source code into an assembly differs with each language.
To allow multiple languages to be compiled into a single assembly, the project would basically have to produce an assembly for each language, then IL-Merge them. This is costly, requires complex automation and project file code generation, and in most circumstances it's a pretty fringe need, so the VS team simply didn't build it in.
While projects are restricted to a single language, a solution is not... and solutions can contain multiple projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With