What is the name of C# compiler?

 Posted by Raja on 3/3/2009 | Category: C# Interview questions | Views: 20480

The name of C# compiler is CSC.

eg. to create the executable of the .cs file you can use

csc File.cs 

This will create File.exe file.

For more details visit: http://msdn.microsoft.com/en-us/library/78f4aasd.aspx

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Fzd.indramohan on: 3/4/2009
The command line C# compiler is a program named CSC.EXE. This program makes use of a dynamic link library named CSCOMP.DLL that contains the actual compiler code. Another DLL, CSCOMPMGD.DLL ("C# compiler managed") is also included with the .NET Framework SDK and is accessible to .NET programs. See the documentation of the Microsoft.CSharp namespace for details. The Key of C# program makes use of the C# compiler in this namespace. The interface to CSCOMP.DLL, on the other hand, is not documented.

To run the C# compiler on the command line, the PATH environment variable must be set to indicate the directory in which CSC.EXE is stored. Visual C# .NET and Visual Studio .NET create special Command Prompt windows that are appropriate for running the C# compiler.

If you've installed Visual C# .NET or Visual Studio .NET, you can open an appropriate Command Prompt window by choosing Microsoft Visual Studio .NET on the Start program menu, then Visual Studio .NET Tools, and then Visual Studio .NET Command Prompt.

If instead you've installed the .NET Framework SDK, just open the regular Command Prompt window form the Accessories submenu of the Start program menu.

Once the Command Prompt window is open, you can check that you have access to the C# compiler by entering the command:

csc /help

Login to post response