redistributing and using the CS.exe compiler (C #) for my application

We are currently creating an application that should compile C # code. Can we distribute csc.exe in our package? I thought this comes with installing the .Net Framework, but looking through the Microsoft website, I see that there is a difference between the .Net Framework and the .Net SDK.

What are my options?

+6
compiler-construction c #
source share
3 answers

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

However, you may not need to call csc.exe in the first place - there is CSharpCodeProvider , which allows you to compile code programmatically.

+16
source share

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

+2
source share

csc.exe is available with a basic installation of the framework.

+1
source share

All Articles