gmcs in Visual Studio
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTq7p9s35iCZVzqZRjwizPLwTwQtH_r1lDf01V19rxBNdcctPaR7gMZxmN0QbBd8v-G3TIEZzPEQCpk-H-IKd3-FDXh49xITDpjQjd51wsYfFHFAMxYM8LOPlPeUL2J1OWjzmCMkNY8Kw/s400/vsbuild.png)
I was trying to learn a bit about MSBuild today and how things get built in Visual Studio, and I came across a cute little hack. I may be the last person in the world to discover it, but I still thought it was neat. If you go to: C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CSharp.targets around line 145, and delete these two lines: ErrorReport="$(ErrorReport)" FileAlignment="$(FileAlignment)" and around line 166, change these two lines: ToolExe="$(CscToolExe)" ToolPath="$(CscToolPath)" to this: ToolExe="gmcs.bat" ToolPath="C:\Program Files (x86)\Mono-2.2\bin" (your ToolPath may vary) when you build your C# projects in VS2k8, it will build them with Mono's C# compiler "gmcs" instead of Microsoft's "csc" compiler. (If you try this, you should of course backup your Microsoft.CSharp.targets file.)