Frage

The Roslyn end-user preview is a VSIX (Visual Studio extension), but it replaces the compilers in the system .NET Framework installation, such that involving csc.exe from the command-line will begin using Roslyn.

Is it possible to install the Roslyn csc.exe on a computer without Visual Studio installed? How?

(Yes, Roslyn works with Visual Studio 2013 Express, so licensing is not an issue. But disk space IS. Even the Express edition has a very large footprint compared to say SharpDevelop.)

War es hilfreich?

Lösung

Take a look at the CompilerPackage sources to see how we install the compiler on your machine when you install the preview VSIX. The trick is we drop some MSBuild files in AppData\Local\Microsoft\MSBuild\12.0\<target name>\ImportAfter. These files are loaded automatically in any C# or VB.NET build. In them, we change the corresponding CscToolPath or VbcToolPath to a path that contains the Roslyn compilers. There's also some additional trickery to deal with multiple hives in the scenario if you had different versions of the compilers installed in different experimental hives in VS.

So if you take a look at that, create those same .target files and edit them to point to some place where you've dropped rcsc and rvbc, it should work.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top