Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is csc2.exe?

What is csc2?

Visual Studio 2013 shipped with a commandline C# compiler csc.exe in C:\Program Files (x86)\MSBuild\12.0\Bin. I sometimes used it to build little hello world apps eg. csc hello-world.cs

Visual Studio 2015 still ships with csc.exe but also a new csc2.exe in C:\Program Files (x86)\MSBuild\14.0\Bin. What is csc2.exe? How's it different from csc.exe?

like image 747
Colonel Panic Avatar asked Feb 24 '15 16:02

Colonel Panic


1 Answers

Those are part of Roslyn, the new open source .NET compiler platform.

From their CodePlex page:

Building the command line compilers

Note that in most situations the compilers will NOT be invoked through csc and vbc for performance reasons, but they are the simplest way to debug. Other entry points include:

  1. csc2.exe and vbc2.exe. These are extremely small native executables that simply start or connect to a VBCSCompiler.exe process and send command line arguments to it. This allows the VBCSCompiler.exe process to reuse loaded assemblies for multiple projects.

The source of csc2 can be found here. As you can see, it is just a very small starter application.

like image 162
Patrick Hofman Avatar answered Oct 02 '22 17:10

Patrick Hofman