Reputation: 4596
I know that Visual studio internally uses a tool called msbuild to compile C# code. Does msbuild internally use csc.exe (that comes with the .net framework) for compiling code? Or does Visual studio come with its own compiler?
Update (A little deviation from the original question): Powershell uses .net types. So does powershell also target csc.exe? If yes, doesn't that mean that powershell is not pure scripting?
Upvotes: 2
Views: 870
Reputation: 4083
MsBuild is essentially a build scheduling framework supplemental to compilers to manage all aspects of the build. Each supported language would have their own suite of MsBuild logic that dictates what occurs when the project is built. For C# projects, the compiler logic would be called from CSharp.Targets, while building a database project would entail using the targets file installed with that add on.
Upvotes: 0
Reputation: 172408
MSBuild uses csc.exe as its actual compiler, it uses solution and project files to build the project.
And also note that csc comes as a part of the .Net
framework.
When you build a project by using the Visual Studio IDE, you can display the csc command and its associated compiler options in the Output window. To display this information, follow the instructions in How to: View, Save, and Configure Build Log Files to change the verbosity level of the log data to Normal or Detailed. After you rebuild your project, search the Output window for csc to find the invocation of the C# compiler.
Upvotes: 7