I want to build projects from the command line. Is it possible to deploy a C# compiler without installing Visual Studio?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Sure, the framework includes a compiler, csc.exe. Look at this article for a quick how-to. The important parts:
Also look at this MSDN article for a full guide and explanation.
Note that for more recent versions, you will be looking for the MSBuild standalone package rather than the framework -- see @Vadzim's answer.
Yes, if you have the .NET SDK, it's there. For example,
msbuild.exe
should be there too, and you can use that to build project (.csproj
) files.You only need the .NET framework. You can use Notepad to edit and the CSC.exe to compile.
Contrary to what some of the other answerers say, you do NOT need the SDK, just the .NET Framework to get the C# compiler,
csc.exe
.Also, consider other (free) IDEs like MonoDevelop, #develop, and Visual C# Express. (You said you don't want Visual Studio, not that you don't want an IDE at all ;) )
Like some others have mentioned MSBuild is deployed with the .NET Framework (versions 2.0 and 3.5) so if you have either of those installed you can build your applications without needing Visual Studio installed on the machine.
Sayed Ibrahim Hashimi
My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build
Yes, but you need to download and install .NET Framework SDK.
Here's a link that can help you.