views:

551

answers:

3

Hi Guys, We are currently building an application which needs to compile a C# code. Can we redistribute the CS.exe in our package. I thought that it comes with the .Net framework installation but from looking in Microsoft Web site i see that there is a difference between .Net framework and the .Net SDK

What are my options?

Thanks, Adi

+14  A: 

csc.exe is definitely part of the framework itself, not just the SDK.

However, you may not need to call out to csc.exe in the first place - there's CSharpCodeProvider which lets you compile code programmatically.

Jon Skeet
Upvoting you is a sport now huh.
Rayne
+2  A: 

You might find this article from Microsoft useful - http://support.microsoft.com/kb/304655. It gives some examples of how to programmatically compile code using the CodeDomProvider or the CSharpCodeProvider.

Malcolm
You are my man!!!
Ragoler
+1  A: 

csc.exe is available with the base installation of the framework.