Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you compile C#?

Tags:

c#

compilation

So, I was wondering how to compile C#. I have Windows 7 Enterprise. Is there a built-in program or do I have do download one?

If I have to download one, what do you recommend?

I have Googled this, and it told me about "csc.exe" but I can't find this.

like image 447
roperson Avatar asked Nov 02 '11 21:11

roperson


People also ask

How do I compile and run C code?

Step 1: Open turbo C IDE(Integrated Development Environment), click on File and then click on New. Step 2: Write the C program code. Step 3: Click on Compile or press Alt + F9 to compile the code. Step 4: Click on Run or press Ctrl + F9 to run the code.

How does C compile work?

The compiler checks the source code for the syntactical or structural errors, and if the source code is error-free, then it generates the object code. The c compilation process converts the source code taken as input into the object code or machine code.

Which command is compile in C?

To do this we need to use the command gcc followed by the name of the program we are going to execute.


1 Answers

For any real development, an IDE is preferable. Microsoft offers the Visual Studio Express edition for free, which has everything you need to get started with C#.

However, you can compile using just the command line compiler (csc.exe), which is included with the framework.

It should be located in the .NET installation dir; for instance on my machine for .NET 4, 64 bit version, I have a csc.exe in:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319
like image 181
driis Avatar answered Sep 19 '22 19:09

driis