Is it possible to install a C# compiler without Visual Studio?

后端 未结 11 2230
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 21:32

I want to build projects from the command line. Is it possible to deploy a C# compiler without installing Visual Studio?

11条回答
  •  醉酒成梦
    2020-11-29 22:00

    I was just looking for a solution like this so that I could just make small console applications using C#.

    The method that worked for me was mentioned by Brian, all I did was, after creating my file to simply do:

    C:\WINDOWS\Microsoft.NET\Framework\v[your version number]\csc.exe myfile.cs
    

    and it will generate your .exe file that you can then use :)

提交回复
热议问题