Where is the .NET command line compiler (csc.exe) located after install?
I'm trying to set up my path to compile C# applications from the command line, but I can't find where csc.exe has been installed.
I'm using .NET 4 and Windows 7 Pro 64-bit.
NET uses two compilers, Roslyn, to compile C# or VB code into CIL (common intermediate language), and RyuJIT, to run just-in-time compilation of CIL into native code. Both compilers are highly regarded by the . NET community as Microsoft actively improves them.
First, locate the C# compiler on your computer. (You can use your computer's search facility: press Start in the lower left corner, press Search, then within the Search window, select ``Search all files'' and then type a search for csc.exe.) This folder is the ``path'' to the compiler.
The . NET command-line interface (CLI) is a cross-platform toolchain for developing, building, running, and publishing . NET applications. The .
Developer Command Prompt Search for the name of the command prompt file, which is VsDevCmd. bat, or go to the Tools folder for Visual Studio, such as %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools (path changes according to your Visual Studio version, edition, and installation location).
In the respective %windir%\Microsoft.NET\Framework\vXXXX
folder.
Each version of the runtime has its own compiler, which would make 4.0:
%windir%\Microsoft.NET\Framework\v4.0.30319\csc.exe
Your minor version (the 30319
) may vary.
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