Hack the Build: Peeking under the Hood
Jomo Fisher--I like to know how things work. When someone says “Trust me” I get suspicious and more curious than I might have been. I want to know why I should trust them. I want to know the details.
If you build your application in VS Beta1 and you have the output window open you will see something like:
------ Build started: Project: WindowsApplication1, Configuration: Debug Any CPU ------
ResGen.exe /useSourcePath /compile Properties\Resources.resx,obj\Debug\WindowsApplication1.Properties.Resources.resources
Csc.exe /noconfig /warn:4 /define:DEBUG;TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.40426\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.40426\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.40426\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.40426\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.40426\System.Xml.dll /debug+ /debug:full /optimize- /out:obj\Debug\WindowsApplication1.exe /resource:obj\Debug\WindowsApplication1.Properties.Resources.resources /target:winexe Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.cs Properties\Settings.cs
Build complete -- 0 errors, 0 warnings
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
This is a concise summary of what happened and is exactly what most people want. But it doesn’t show the details. This is MSBuild saying “Trust me.” If you want the details, MSBuild has a lot more to say.
In the HKLM\Software\Microsoft\VisualStudio\8.0\vsproject key, set the HostLoggerVerbosity DWORD value.
0x4 |
gets you "diagnostic" logging. |
0x3 |
gets you "detailed" logging. |
0x2 |
gets you "normal" logging. |
0x1 |
(default) gets you "minimal" logging. |
0x0 |
gets you "quiet" logging. |
Now do a Rebuild (doing a Build skips MSBuild altogether if there’s no work to do).
Next time I’ll take apart some bits of this log to see what’s really going on.
This posting is provided "AS IS" with no warranties, and confers no rights.
Comments
- Anonymous
September 09, 2004
We must welcome <a href="http://blogs.msdn.com/jomo_fisher/">
another member of the msbuild team.</a>. One day I will have to cover how to use