<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MSBuild Team Blog</title><link>http://blogs.msdn.com/b/msbuild/</link><description>&amp;quot;Coding ... the boring bit between builds&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.21163 (Build: 5.6.583.21163)</generator><item><title>Second edition of the MSBuild and Team Foundation Build book released</title><link>http://blogs.msdn.com/b/msbuild/archive/2011/01/05/second-edition-of-the-msbuild-and-team-foundation-build-book-released.aspx</link><pubDate>Wed, 05 Jan 2011 09:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10112881</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10112881</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2011/01/05/second-edition-of-the-msbuild-and-team-foundation-build-book-released.aspx#comments</comments><description>&lt;p&gt;&lt;span&gt;
&lt;p&gt;Not many books that are reviewed like this on Amazon:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5545.clip_5F00_image001_5F00_6FE4C8D4.png"&gt;&lt;img height="36" width="173" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8765.clip_5F00_image001_5F00_thumb_5F00_44900C00.png" alt="clip_image001" border="0" title="clip_image001" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now the heavily augmented second edition has just come out, written by several people at Microsoft and reviewed by the product team.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New extensive coverage of building C++ with MSBuild&lt;/li&gt;
&lt;li&gt;Complete rewrite of the Team Build sections to cover the new Windows Workflow Foundation build orchestration&lt;/li&gt;
&lt;li&gt;Detail on new MSBuild 4.0 features like inline tasks, and item and property functions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7282.image_5F00_22C4336F.png"&gt;&lt;img height="244" width="200" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5148.image_5F00_thumb_5F00_4538C22A.png" alt="image" border="0" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you need a reference to Team Build or MSBuild, you should get it.&lt;/p&gt;
&lt;p&gt;-- Dan,&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;VS Solution/Project/Build dev lead&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&amp;nbsp;&lt;/strong&gt;Here's a&amp;nbsp;&lt;a target="_blank" href="http://www.amazon.com/Inside-Microsoft-Build-Engine-Foundation/dp/0735645248/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1294270965&amp;amp;sr=8-2"&gt;link to the book on Amazon&lt;/a&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10112881" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category></item><item><title>Incorrect solution build ordering when using MSBuild.exe</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/12/21/incorrect-solution-build-ordering-when-using-msbuild-exe.aspx</link><pubDate>Tue, 21 Dec 2010 09:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10112880</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10112880</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/12/21/incorrect-solution-build-ordering-when-using-msbuild-exe.aspx#comments</comments><description>&lt;p&gt;&lt;span&gt;
&lt;p&gt;We've had a few reports of cases where Visual Studio, and previous versions of MSBuild, will build the projects in the solution in the correct order, but the 4.0 version of MSBuild.exe gets the order wrong.&lt;/p&gt;
&lt;p&gt;Here's a full description of what's going on, why it began in 4.0, and the fix we recommend to your projects to solve the problem. If you're not interested in the "why", skip ahead to the workaround.&lt;/p&gt;
&lt;h4&gt;Archetypical case exhibiting the problem&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5873.dep1b_5F00_49F1FB10.png"&gt;&lt;img height="388" width="266" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4300.dep1b_5F00_thumb_5F00_6DBA86D0.png" align="left" alt="dep1b" border="0" title="dep1b" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This diagram shows a solution file containing three projects, A, B, and C. Let's say they are C# projects.&lt;/p&gt;
&lt;p&gt;A has a regular project reference to B, so it will invoke B, then when B comes back done, it will build itself. At the same time in the solution file, there is a manually specified dependency: B depends on C.&lt;/p&gt;
&lt;p&gt;I've shown regular project references with solid lines, and the information in the solution with dotted lines.&lt;/p&gt;
&lt;p&gt;This manually specified dependency was set up in the solution by right clicking on the solution and choosing Project Dependencies&amp;hellip;, then checking a box. Below I've shown the context menu and what you see in the dialog when you have this setup.&lt;/p&gt;
&lt;p&gt;The build ordering you expect here is C, then B, then A, and Visual Studio shows that correctly in the Build Order tab, as you see below.&lt;/p&gt;
&lt;p&gt;Of course a real case would have more projects in it, but it would boil down to this case.&lt;/p&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;
&lt;h4&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5873.image_5F00_0C24C7BA.png"&gt;&lt;img height="390" width="380" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3716.image_5F00_thumb_5F00_42B272FE.png" alt="image" border="0" title="image" /&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;h4&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8585.image_5F00_0B1CB210.png"&gt;&lt;img height="354" width="381" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1256.image_5F00_thumb_5F00_6950D97E.png" alt="image" border="0" title="image" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5873.image_5F00_7499EDBB.png"&gt;&lt;img height="352" width="379" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2727.image_5F00_thumb_5F00_3246D578.png" alt="image" border="0" title="image" /&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;h4&gt;Why does this happen (skip ahead if you just want the "fix")&lt;/h4&gt;
&lt;p&gt;Essentially the problem is that MSBuild doesn't know anything about the project files until it starts to build them.&lt;/p&gt;
&lt;p&gt;Solution files, as you know, are not in MSBuild format (yet). On the command line, MSBuild.exe is on its own, so it parses them and generates one or more in-memory MSBuild format files that are essentially a translation. If you want to see these ugly files, set an environment variable MSBUILDEMITSOLUTION=1 then build the solution. You'll see a&amp;nbsp;&lt;strong&gt;.sln.metaproj&lt;/strong&gt;&amp;nbsp;file emitted next to your solution file, and possibly one or more files with an extension like&amp;nbsp;&lt;strong&gt;.csproj.metaproj&lt;/strong&gt;&amp;nbsp;next to some of your projects.&lt;/p&gt;
&lt;p&gt;The .metaproj generated for B.csproj is how MSBuild makes sure that the solution dependency is respected -- at least, it's created so that the solution itself does not invoke B until C is built. It does this by invoking the B metaproj instead of B directly, and in the B metaproj, it builds C before B. This is exactly equivalent to someone going into B and adding a project reference to C, instead of a solution dependency, but it means that we don't have to edit the B project directly.&lt;/p&gt;
&lt;p&gt;Here's what it looks like after this translation:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5270.dep2_5F00_2976CD2C.png"&gt;&lt;img height="427" width="399" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7026.dep2_5F00_thumb_5F00_67FC1AD2.png" align="left" alt="dep2" border="0" title="dep2" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Why doesn't that work in this case? In short, the problem is the project reference from A to B. Here's what happens: the solution invokes A.csproj, B.metaproj, and C.csproj concurrently (or at least, in undefined order), which would normally be fine. B.metaproj invokes C.csproj, and waits, then invokes B.csproj. However in the meantime, A.csproj was invoked, and because it has a project reference to B.csproj, it invokes B.csproj -- it "goes around the back". C.csproj hasn't necessarily built yet, so the build breaks.&lt;/p&gt;
&lt;h4&gt;Why did this work in previous versions of MSBuild?&lt;/h4&gt;
&lt;p&gt;In previous versions, we loaded and scanned every project file listed in the solution, and any they referenced, in order to draw a complete graph. Then we used the graph to create the MSBuild format equivalent of the solution file. The reason we did all this scanning was not actually to address this problem, it was to make interop with old-style non-MSBuild VC projects (".vcproj") work correctly. It was also slow, especially for large solutions.&lt;/p&gt;
&lt;p&gt;In VS2010, VC projects converted to MSBuild, so in 4.0 we took out this complex interop code. After making .metaproj's to express any dependencies stored in the solution file, we could now simply invoke all the projects in the solution and the build would order itself. That was potentially much faster, because we didn't need to load any projects (potentially hundreds) to scan them before building anything. (Of course, when MSBuild 4.0 is fed a VS2005 or VS2008 solution file, it still calls into the old code in the old assembly to do it the old way, since they may contain .vcproj's. So those guys don't have this problem.) The oversight was this case -- where a project reference "goes behind the back" of a solution-expressed dependency.&lt;/p&gt;
&lt;p&gt;To fix this we would have to revert to loading and scanning, which slows things down -- the correct approach is to use project references instead of solution dependencies, as I explain below.&lt;/p&gt;
&lt;h4&gt;How to fix this&lt;/h4&gt;
&lt;p&gt;Follow this principle: do not use dependencies expressed in the solution file at all! Better to express dependencies in the file that has the dependency: put a project reference in the project, instead. In our example, that would be a project reference from B to C.&lt;/p&gt;
&lt;p&gt;You may not have done that before because you didn't want to reference the target of the project reference, but merely order the build. However, in 4.0 you can create a project reference that only orders the build without adding a reference. It would look like this - note the metadata element, and all this is inside an &amp;lt;ItemGroup&amp;gt; tag of course:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Courier New'; font-size: small;"&gt;&amp;lt;ProjectReference Include="... foo.csproj"&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ReferenceOutputAssembly&amp;gt;false&amp;lt;/ReferenceOutputAssembly&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;/ProjectReference&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Note that you have to add the child element with a text editor -- Visual Studio can add a project reference, but doesn't expose UI for this metadata.&lt;/p&gt;
&lt;p&gt;I can tidy up by removing the dependency in the solution file as well - removing now-unnecessary lines like this -- your GUID will be different, but use the VS dialog and it will do the job.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Courier New'; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProjectSection(ProjectDependencies) = postProject&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {B79CE0B0-565B-4BC5-8D28-8463A05F0EDC} = {B79CE0B0-565B-4BC5-8D28-8463A05F0EDC}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Courier New'; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndProjectSection&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you're using&amp;nbsp;&lt;strong&gt;C++ projects&lt;/strong&gt;, you are less likely to have this problem, because in the upgrade process that converts .vcproj's to .vcxproj's, it moves any solution dependencies relating to them to project references for you. However, if you do, there's a similar fix. For C++/CLI project references to other managed projects, use project references like the one above. For the equivalent situation with a project reference to a static lib, where you want a project reference without linking in the referenced lib, the metadata you want is&lt;/p&gt;
&lt;span style="font-family: 'Courier New'; font-size: small;"&gt;&amp;lt;ProjectReference Include="... lib.vcxproj"&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinkLibraryDependencies&amp;gt;false&amp;lt;/LinkLibraryDependencies&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;/ProjectReference&amp;gt;&lt;/span&gt;
&lt;h4&gt;Summary&lt;/h4&gt;
&lt;p&gt;Although it's tiresome to have to edit your projects in this way to make the bug go away, it's a best practice to use project references instead and consider the solution file merely a "view", and you'll end up with projects that if you want can be built without a solution file.&lt;/p&gt;
&lt;h4&gt;Post Script&lt;/h4&gt;
&lt;p&gt;I know of one other, more obscure and completely different case, where MSBuild 4.0 does not order correctly but Visual Studio does. This can happen if you have web application projects, AND you build with 64 bit MSBuild (which is the default, in Team Build 2010). I won't go into the tedious details but the fix is to do one of these things: (1) set a property or environment variable named MSBuildExtensionsPath to C:\program files (x86)\msbuild or (2) Build with 32 bit MSBuild, which I recommend in general for other reasons or (3) copy the web application targets files under the 64 bit program files MSBuild folder to the equivalent location in the 32 bit program files MSBuild folder.&lt;/p&gt;
&lt;p&gt;If you find any other case where the solution is not ordering correctly yet this workaround does not work, that's interesting. Please make a minimal repro like the one in this bug, and send it to Dan at&lt;a href="mailto:msbuild@microsoft.com"&gt;msbuild@microsoft.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Dan&lt;/p&gt;
&lt;h4&gt;&lt;span style="color: #800000;"&gt;Update (12/25)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Luc C points out below that sometimes removing a project reference in favor of a new solution dependency reference is an alternative solution. That assumes you're only using the project reference for ordering , or you replace it with a file reference. Still, I do recommend project references in general, on the principle of "express the dependency in the place it applies" &amp;ndash; you can look at the project and see that the dependency is correct, and you can include the projects in more than one solution easily.&lt;/p&gt;
&lt;p&gt;Luc also points out the case of a managed project depending on a non-CLR native project (presumably for PInvoke). In my experiments, VS will let you add a project reference, albeit with an ugly bang, and it will do the ordering correctly, as will msbuild.exe.&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10112880" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/bugs/">bugs</category></item><item><title>MSBuild Known Issues</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/07/15/msbuild-known-issues.aspx</link><pubDate>Thu, 15 Jul 2010 09:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10039043</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10039043</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/07/15/msbuild-known-issues.aspx#comments</comments><description>&lt;p&gt;Since the release of Visual Studio 2010 we have received a few reports of crashing behavior which can be traced back to issues with MSBuild.&amp;nbsp; We&amp;rsquo;ve analyzed all of these and there are several particular cases where a crash can occur.&amp;nbsp; We&amp;rsquo;ve also added a notification to Windows Error Reporting to help guide those who hit these errors.&amp;nbsp; You can determine you your error is one of these either by matching the problem description below, or looking in the Event Viewer as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the Event Viewer&lt;/li&gt;
&lt;li&gt;Search for Information events with ID = 1001 and Source = Windows Error Reporting.&amp;nbsp; Look for those with the time that approximately matches when you saw the crash.&lt;/li&gt;
&lt;li&gt;At the top of the details pane for the event is text that would look like the below.&amp;nbsp; If the bucket number is not 1055654512, then this post may not apply to you.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Fault bucket 1055654512, type 1&lt;/p&gt;
&lt;p&gt;Event Name: APPCRASH&lt;/p&gt;
&lt;p&gt;Response: xxxxxxx&lt;/p&gt;
&lt;p&gt;Cab Id: 0&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;Crash when debugging using F5&lt;/h4&gt;
&lt;p&gt;Problem: This can occur if the build process is missing a required target.&amp;nbsp; This is normally due to an improperly customized build process.&amp;nbsp; If you are using the .NET MicroFramework 4, which is not supported in Visual Studio 2010, you may also see this issue.&lt;/p&gt;
&lt;p&gt;Solution: Provide the missing target.&amp;nbsp; Try building the project/solution on the command-line.&amp;nbsp; If MSBuild logs an error that a target is missing, that could be the problem.&amp;nbsp; &lt;/p&gt;
&lt;h4&gt;Crash when registering COM component&lt;/h4&gt;
&lt;p&gt;Problem: COM registration requires the user have permission to certain registry keys, and lacking that permission the RegASM task crashes.&lt;/p&gt;
&lt;p&gt;Solution: Ensure the registry keys needed to perform the registration are accessible to the account doing the registration.&amp;nbsp; Look under HKCR\Record for the GUID matching the type (or types) associated with the COM components you are registering.&lt;/p&gt;
&lt;h4&gt;Invalid Project Exception when building with .NET MicroFramework 4&lt;/h4&gt;
&lt;p&gt;Problem: When building projects with Visual Studio 2010 and the .NET MicroFramework 4, the build would fail with an InvalidProjectFileException.&amp;nbsp; The .NET MicroFramework 4 is not compatible with Visual Studio 2010.&lt;/p&gt;
&lt;p&gt;Workaround: There is unfortunately no workaround for this.&amp;nbsp; According to the .NET MicroFramework 4 team, the next version of the MicroFramework will support VS2010.&amp;nbsp; Check out &lt;a href="http://www.microsoft.com/netmf/default.mspx" title="http://www.microsoft.com/netmf/default.mspx"&gt;http://www.microsoft.com/netmf/default.mspx&lt;/a&gt; for updated information.&lt;/p&gt;
&lt;h4&gt;MSBuild throws an error that it cannot find msbuild.exe&lt;/h4&gt;
&lt;p&gt;Problem: Building on the command-line or from Visual Studio displays an error that MSBuild could not find MSBuild.exe during a C++ or multiproc build.&amp;nbsp; If your username is exactly 20 character long excluding your domain (the maximum allowed under Windows), there is a bug in the .NET Framework which will prevent us from authenticating the other MSBuild nodes.&lt;/p&gt;
&lt;p&gt;Workaround: Build under an account with a name that is less than 20 characters.&amp;nbsp; The bug should be fixed in the next version of the .NET Framework.&lt;/p&gt;
&lt;h4&gt;MSBuild throws an OutOfMemory exception&lt;/h4&gt;
&lt;p&gt;Problem: Your build in Visual Studio aborts with an OutOfMemory exception.&amp;nbsp; It may or may not also do this when built from the command-line.&amp;nbsp; This occurs typically when there are a very large number of projects with a lot of interdependencies, or when projects have an extremely large number of source files.&lt;/p&gt;
&lt;p&gt;Workaround: Build your solution on the command-line, so that your process does not have Visual Studio&amp;rsquo;s initial memory foot print; or build on a 64-bit machine under a 64-bit command window so we can take advantage of the additional virtual memory spacel or split your solution into smaller chunks which can be built individually; or create a solution configuration in which only a subset of your projects build.&lt;/p&gt;
&lt;h4&gt;Visual Studio crashes when building a solution containing C++ and WiX projects&lt;/h4&gt;
&lt;p&gt;Problem: When building a solution which contains C++ and WiX projects, Visual Studio may crash. &lt;/p&gt;
&lt;p&gt;Solution: This problem has been traced to a bug in the WiX project system.&amp;nbsp; Please contact the WiX project for a newer version with the correct bits.&lt;/p&gt;
&lt;h4&gt;Other issues&lt;/h4&gt;
&lt;p&gt;For some crashing issues we have set up Windows Error Reporting so that it will automatically request for you to send us additional information and contact us directly.&amp;nbsp; If you see such a request, please consider providing us with the requested additional information so we can either determine that your issue is already known or address it in the next version of the product. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10039043" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Known+Issues/">Known Issues</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Debugging/">Debugging</category></item><item><title>Debugging MSBuild script with Visual Studio (3)</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/07/09/debugging-msbuild-script-with-visual-studio-3.aspx</link><pubDate>Fri, 09 Jul 2010 08:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10037028</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10037028</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/07/09/debugging-msbuild-script-with-visual-studio-3.aspx#comments</comments><description>&lt;p&gt;In my last two posts (&lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx"&gt;&lt;span style="color: #0066dd;"&gt;here&lt;/span&gt;&lt;/a&gt; and &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/07/09/debugging-msbuild-script-with-visual-studio-2.aspx"&gt;&lt;span style="color: #0066dd;"&gt;here&lt;/span&gt;&lt;/a&gt;) I showed how to enable the unsupported MSBuild debugger to debug a build started on the command line with MSBuild.exe. In this final post, I'll mention some other variations.&lt;/p&gt;
&lt;p&gt;Note that this blog is rather narrow, so some of the screenshots may be hard to see &amp;ndash; you can click on them to see the full size version. &lt;/p&gt;
&lt;h3&gt;Scenario 3: Debug a Solution file on the command line&lt;/h3&gt;
&lt;p&gt;In the previous example, I launched msbuild.exe against a project file. You well might want to start with a solution file instead. If you do, you may get an error that looks like this:&lt;/p&gt;
&lt;p&gt;Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Mismatched leave was C:\Users\danmose\Do &lt;br /&gt;cuments\visual studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1.sln.metaproj expected C:\Users\dan &lt;br /&gt;mose\Documents\visual studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1.csproj (2,1)&lt;/p&gt;
&lt;p&gt;The workaround is as follows. First, set an environment variable MSBUILDEMITSOLUTION=1. Then do a build of the solution in the regular way: if you want, you can cancel it after it starts building projects. Next to the solution file, you should see a file with the extension ".sln.metaproj". This is essentially the solution file translated into MSBuild-format. Now do the usual debugging procedure, but this time launch msbuild.exe against this sln.metaproj file instead of the original solution file.&lt;/p&gt;
&lt;h3&gt;Scenario 4: Multiprocessor build&lt;/h3&gt;
&lt;p&gt;When you're debugging your build process or tasks, it's much easier to follow if only one project is building at a time, and you'll probably do it that way whenever you can. What's more, debugging slows down the build so much that it may not help you diagnose a timing problem anyway.&lt;/p&gt;
&lt;p&gt;If however for some reason you do need to debug a multiprocessor build, it's possible.&lt;/p&gt;
&lt;p&gt;As you probably know, MSBuild launches child processes to build more than one project at once, and they persist for a while to be ready for another build. The /debug switch doesn't propagate to them. To get this to work, first terminate any msbuild.exe processes that are still alive. Then in a command window set an environment variable MSBUILDDEBUGGING=1. That environment variable is equivalent to the /debug switch, but unlike the switch it will get propagated to any child processes.&lt;/p&gt;
&lt;p&gt;From this command window now start msbuild.exe with the /debug switch as usual. Everything will work much the same as before, but you'll get a new JIT prompt as each child process starts to do its work, and you'll have to use a new instance of Visual Studio for each one of them.&lt;/p&gt;
&lt;p&gt;For example, I'm building a solution here, using the .metaproj workaround I mentioned above. Attaching at the first JIT prompt, I can see I am starting in the .metaproj itself:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1731.image_5F00_39023CCA.png"&gt;&lt;img height="211" width="831" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5531.image_5F00_thumb_5F00_654EE97B.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;If I hit Continue (F5) I'll get to the top of the next project, and stop there as usual. In the callstack window, I can see that the solution has invoked that project, and I can double click on the lower frame in the callstack to see where it did that &amp;ndash; it's an MSBuild task, of course:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4786.image_5F00_6CDA58E8.png"&gt;&lt;img height="247" width="743" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0245.image_5F00_thumb_5F00_4D2B7F20.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;While I'm stopped here, I get a JIT prompt again. This time it's for the other project in my solution, which has already started to load in parallel in another msbuild.exe process. I'll go through the JIT prompts as I did before, and select to start a new instance of Visual Studio. That will in turn break in at the top of that other project.&lt;/p&gt;
&lt;p&gt;Here's what I see now:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5531.image_5F00_54B6EE8D.png"&gt;&lt;img height="565" width="664" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1731.image_5F00_thumb_5F00_0E39FE85.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Visual Studio supports debugging more than one process at the same time, which would be more convenient, but I don't think the JIT launcher will let you do that. If you have a lot of child processes, it could get rather cumbersome. Remember that the "/m" switch defaults to the same number of processes as you have CPU's, so you may want to cut it down with "/m:2".&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Scenario 5: Debugging projects while they are loaded in Visual Studio&lt;/h3&gt;
&lt;p&gt;When I wrote the prototype, it was also possible to debug the evaluation and building of projects loaded in Visual Studio.&lt;/p&gt;
&lt;p&gt;Unfortunately in walking through this scenario to write this blog post, I was sorry to find that it's somewhat broken in the release version of Visual Studio 2010. In my experiments debugging works through the first evaluation, as the projects are loaded, but then it hits a bug and terminates. Since it's an untested feature there's always the chance something can break without detection and that's apparently what happened here. &lt;/p&gt;
&lt;p&gt;Given that, you'll most likely have to stick with msbuild.exe. However, I'll go ahead and explain a little about how one would do this in Visual Studio, in case you have better luck than I do.&lt;/p&gt;
&lt;p&gt;Start off by setting the registry key as described at the start of my &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx"&gt;&lt;span style="color: #0066dd;"&gt;first post&lt;/span&gt;&lt;/a&gt; and kill any lingering instances of MSBuild.exe as you did in the last scenario.&lt;/p&gt;
&lt;p&gt;Make sure the environment variable MSBUILDDEBUGGING is &lt;em&gt;not &lt;/em&gt;set and open your first Visual Studio to act as your debugger. You can do this from the start menu. As before make sure Just-My-Code is switched on in this instance.&lt;/p&gt;
&lt;p&gt;Open a command prompt and set the environment variable MSBUILDDEBUGGING=1 again. Then launch Visual Studio from that command prompt -- most likely you'd start it with a command like "%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe". This second instance is your debuggee, which you will load your projects into.&lt;/p&gt;
&lt;p&gt;Go back to the debugger process, and attach to that debuggee, choosing the "Managed (v4.0)" engine as always. In this debugger process, open up the project or targets file you want to start debugging through. Make sure you open it with "Open File" into the XML editor, rather than loading it as an actual project. &lt;/p&gt;
&lt;p&gt;Debugging may not start automatically on the first line this time, so set a breakpoint where you want to begin. I opened the "WindowsFormsApplication1.csproj" file I used before into the XML editor, and set a breakpoint on the first line to get hit when the project is first loaded.&lt;/p&gt;
&lt;p&gt;Open up your project or projects in the normal way in the debuggee now and you should see your breakpoint is hit. Step a little further, and for me, Visual Studio terminates.&lt;/p&gt;
&lt;h3&gt;End of the Walkthrough&lt;/h3&gt;
&lt;p&gt;Now I've shown you all the features of the MSBuild debugger, I hope you'll try it out. &lt;/p&gt;
&lt;p&gt;If you have feedback, do post it here. In particular, how important is it to be able to debug projects loaded inside Visual Studio? Also, as you've seen, MSBuild must be in "debugging mode" from launch -- it's not possible to walk up to a regular build that's in progress and attach to it. Is it important to be able to do that? &lt;/p&gt;
&lt;p&gt;Most of all, how useful is this to you, and how problematic are the bugs and limitations you run into?&lt;/p&gt;
&lt;p&gt;Thanks for reading&lt;/p&gt;
&lt;p&gt;Dan &lt;/p&gt;
&lt;p&gt;Visual Studio Project &amp;amp; Build Dev Lead&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10037028" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Debugging/">Debugging</category></item><item><title>Debugging MSBuild script with Visual Studio (2)</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/07/09/debugging-msbuild-script-with-visual-studio-2.aspx</link><pubDate>Fri, 09 Jul 2010 08:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10037026</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10037026</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/07/09/debugging-msbuild-script-with-visual-studio-2.aspx#comments</comments><description>&lt;p&gt;In my &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx"&gt;&lt;span style="color: #0066dd;"&gt;previous post&lt;/span&gt;&lt;/a&gt;, I showed how to enable the hidden Visual Studio debugger for MSBuild script, and demonstrated it by stepping through the evaluation of a C# project. In this post, I'll keep debugging into the actual build of that project.&lt;/p&gt;
&lt;p&gt;Note that this blog is rather narrow, so some of the screenshots may be hard to see &amp;ndash; you can click on them to see the full size version.&lt;/p&gt;
&lt;p&gt;Starting from where we left off last post, I'll set a breakpoint in Microsoft.CSharp.targets on the &amp;lt;Csc&amp;gt; task tag. That's where the compiler will run. Then hit F5 to run to it.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2287.image_5F00_61F36390.png"&gt;&lt;img height="371" width="681" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3386.image_5F00_thumb_5F00_26CFAD92.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Ideally, I'd be able to set a breakpoint on the enclosing &amp;lt;Target&amp;gt; tag, but unfortunately there's a bug: you can't. As a workaround you could inspect the values of a target's attributes when you get to the first tag in the body of that target. If the target's condition is false, or if its inputs and outputs are up to date so that it skips, it's not so simple. You'd have to work around this by stepping up to the target before. &lt;/p&gt;
&lt;p&gt;I'd like to be able to evaluate the condition on the task there, but because it's &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms171473.aspx"&gt;&lt;span style="color: #0066dd;"&gt;batchable&lt;/span&gt;&lt;/a&gt; it could have multiple results: the EvaluateCondition delegate I used before won't accept it. If this was a parameter on the task, I'd probably step into the task's code itself to see the value. Since it's a condition, I'd probably look through the metadata on the item list directly, or query the object model in some way.&lt;/p&gt;
&lt;p&gt;Something like the value of Sources is easy to evaluate here, though:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4265.image_5F00_2088D704.png"&gt;&lt;img height="147" width="691" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2605.image_5F00_thumb_5F00_00D9FD3C.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now I want to step into the task implementation.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You might think that at this point, you can simply Step In (F11). However, you can't &amp;ndash; it happens that MSBuild will run this task on a different thread. To know to jump threads properly here, the debugger has to support what they call "causality" for this kind of debugging, and since it doesn't know anything about MSBuild, it doesn't. &lt;/p&gt;
&lt;p&gt;It's easy to get the job done though &amp;ndash; set a breakpoint in the task and run until it's hit.&lt;/p&gt;
&lt;p&gt;I have the source code for the Csc task, so I set a breakpoint here on the setter of the WarningLevel property, and did Continue (F5). I can see the task is getting "4" as the value of that property here. I can debug this code just like any other C# code, stepping through methods and so forth. &lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2703.image_5F00_5D20D5A1.png"&gt;&lt;img height="425" width="701" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6320.image_5F00_thumb_5F00_7688D8DB.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To get out to the XML, I'll set a breakpoint in it and run &amp;ndash; the same trick I used to get into the C#, but in reverse. Here I'm at the next tag after the task:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6835.image_5F00_7E807B3D.png"&gt;&lt;img height="486" width="700" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4278.image_5F00_thumb_5F00_7EECAE32.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I used Csc as an example here, but you'll generally be debugging a custom task (or possibly, logger). Just make sure the assembly is not optimized: since you have Just-My-Code on, it won't be debuggable otherwise. If you only have access to an optimized one, you can switch off Just-My-Code temporarily.&lt;/p&gt;
&lt;p&gt;There's a CallTarget tag here: you can step into those, and like imports they'll look like a new frame on the callstack &amp;ndash; although unlike imports, that's correct for their semantics.&lt;/p&gt;
&lt;p&gt;Probably the biggest limitation (bug) with the debugger right now is that you can't see item and property changes made inside a target. For example, at this point @(_CoreCompileResourceInputs) should be empty because of the line above, but the immediate window tells me it isn't:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7485.image_5F00_78A5D7A4.png"&gt;&lt;img height="246" width="721" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7002.image_5F00_thumb_5F00_71F2CE21.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;When you get past that target, you can see the changes.&lt;/p&gt;
&lt;h3&gt;Scenario 2: Debugging a build with multiple projects&lt;/h3&gt;
&lt;p&gt;Typically there's more than one project in a build. I've added a project reference from this project to another. I've put a breakpoint at the top of that project, and run to it:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5751.image_5F00_4471AE5E.png"&gt;&lt;img height="386" width="802" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0574.image_5F00_thumb_5F00_72CB340B.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The bottom of the callstack is the point in Microsoft.Common.targets where, early in the build of WindowsFormsApplication1, it invoked WindowsFormsApplication2.&lt;/p&gt;
&lt;h5&gt;In my next posts I'm going to cover&lt;/h5&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debugging a multiprocessor build&lt;/li&gt;
&lt;li&gt;Debugging the build of projects loaded into Visual Studio&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See you then! &lt;/p&gt;
&lt;p&gt;Dan &lt;/p&gt;
&lt;p&gt;Visual Studio Project &amp;amp; Build Dev Lead&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10037026" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Debugging/">Debugging</category></item><item><title>Debugging MSBuild script with Visual Studio</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx</link><pubDate>Tue, 06 Jul 2010 07:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10035792</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10035792</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx#comments</comments><description>&lt;p&gt;Back when we started 4.0 development, I polled readers of the MSBuild blog to find out what features were most important to them. &lt;a target="_blank" href="http://blogs.msdn.com/b/msbuild/archive/2007/11/30/response-to-the-feature-poll.aspx"&gt;&lt;span style="color: #0066dd;"&gt;Debugging was #1&lt;/span&gt;&lt;/a&gt; which was very surprising to us. Thinking about it more, it makes sense. In our team we've become so proficient ourselves at reading the XML and making sense of logs that it's easy to forget how difficult it is &amp;ndash; especially for someone new. John Robbins, debugging guru, &lt;a target="_blank" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/11/12/msbuild-3-5-tips-and-a-small-msbuild-4-0-wish-list.aspx"&gt;&lt;span style="color: #0066dd;"&gt;also requested a Visual-Studio-integrated debugger&lt;/span&gt;&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Fast forward to the 4.0 release earlier this year, and we addressed 7 out of 16 of the requests by my count. We had to balance the requests with what Visual Studio itself needed from MSBuild. There were two major requirements it had on MSBuild: to enable &lt;a target="_blank" href="http://blogs.msdn.com/b/vcblog/archive/2008/11/20/printf-hello-msbuild-n.aspx"&gt;&lt;span style="color: #0066dd;"&gt;VC++ to move onto MSBuild&lt;/span&gt;&lt;/a&gt; (#5 request), and to help enable more powerful and fine grained &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/05/19/visual-studio-managed-multi-targeting-part-1-concepts-target-framework-moniker-target-framework.aspx"&gt;&lt;span style="color: #0066dd;"&gt;multi-targeting&lt;/span&gt;&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;It turned out that these two in turn required many other features, most of which were happily also popular requests on that blog poll. We added the ability to define a task with inline code (#7 &amp;ndash; see &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/02/20/msbuild-task-factories-guest-starring-windows-powershell.aspx"&gt;&lt;span style="color: #0066dd;"&gt;powershell example&lt;/span&gt;&lt;/a&gt;) a new, comprehensive object model (#14; in three parts, &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.build.construction.aspx"&gt;&lt;span style="color: #0066dd;"&gt;one&lt;/span&gt;&lt;/a&gt;, &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.build.evaluation.aspx"&gt;&lt;span style="color: #0066dd;"&gt;two&lt;/span&gt;&lt;/a&gt;, &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.build.execution.aspx"&gt;&lt;span style="color: #0066dd;"&gt;three&lt;/span&gt;&lt;/a&gt;), improved &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/01/better-parallelism-in-msbuild-with-yieldduringtaskexecution.aspx"&gt;&lt;span style="color: #0066dd;"&gt;performance&lt;/span&gt;&lt;/a&gt; and scalability in many cases (#8 -- and &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/03/08/tuning-c-build-parallelism-in-vs2010.aspx"&gt;&lt;span style="color: #0066dd;"&gt;here&lt;/span&gt;&lt;/a&gt;), &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/04/02/msbuild-property-functions.aspx"&gt;&lt;span style="color: #0066dd;"&gt;property&lt;/span&gt;&lt;/a&gt; and &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ee886422.aspx"&gt;&lt;span style="color: #0066dd;"&gt;item functions&lt;/span&gt;&lt;/a&gt; (#9 &amp;ndash; albeit not currently extensible) , and accurate automatic dependency checking by performing file system interception (#11), plus some small syntax additions (label, &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ff606262.aspx"&gt;&lt;span style="color: #0066dd;"&gt;import group&lt;/span&gt;&lt;/a&gt;, import by wildcard) and a more configurable build engine (eg see &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.build.execution.buildmanager_members.aspx"&gt;&lt;span style="color: #0066dd;"&gt;here&lt;/span&gt;&lt;/a&gt;, &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.build.execution.buildparameters_members.aspx"&gt;&lt;span style="color: #0066dd;"&gt;here&lt;/span&gt;&lt;/a&gt;, and &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.build.execution.buildsubmission_members.aspx"&gt;&lt;span style="color: #0066dd;"&gt;here&lt;/span&gt;&lt;/a&gt;), plus &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/02/18/build-extensibility-with-net-framework-4.aspx"&gt;&lt;span style="color: #0066dd;"&gt;easier build extensibility&lt;/span&gt;&lt;/a&gt; and some &lt;a target="_blank" href="http://blogs.msdn.com/b/visualstudio/archive/2010/03/05/msbuild-4-detailed-build-summary.aspx"&gt;&lt;span style="color: #0066dd;"&gt;performance diagnostics&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We &lt;em&gt;didn't &lt;/em&gt;have time, unfortunately, to address converting the solution file to MSBuild (#3) &amp;ndash; which we would &lt;em&gt;dearly &lt;/em&gt;love to do &amp;ndash; nor to add a Visual Studio integrated debugger (#1).&lt;/p&gt;
&lt;p&gt;At least, not a supported one!&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/b/jmstall/"&gt;&lt;span style="color: #0066dd;"&gt;Mike Stall&lt;/span&gt;&lt;/a&gt; approached us to demonstrate an ingenious &lt;a target="_blank" href="http://blogs.msdn.com/b/jmstall/archive/2005/07/27/state-machine-theory.aspx"&gt;&lt;span style="color: #0066dd;"&gt;reflection-emit&lt;/span&gt;&lt;/a&gt; idea which made it considerably more feasible to create an MSBuild specific debugger with many of the features of the real managed code debugger. While on leave I wrote and checked-in the code to do it. Unfortunately we couldn't complete it in time to make the 4.0 schedule. &lt;/p&gt;
&lt;p&gt;For that reason, it's in the product, but disabled by default. It does work, it's just not supported or documented, and has a few limitations and bugs: it may be slow, it's not always pretty, and in at least one case, it's a little inaccurate. This blog post is "unofficial" documentation of how to use it in the hope it will be useful. Although it's not supported we will welcome Connect feedback, but it will likely will be moved to our backlog rather than fixed immediately. It would also be a great idea to add any bug reports and feedback to the comments on this blog post.&lt;/p&gt;
&lt;h2&gt;Debugging Walkthrough&lt;/h2&gt;
&lt;p&gt;I'm going to walk through each debugging scenario in turn. &lt;/p&gt;
&lt;p&gt;Before you start, open Visual Studio briefly and make sure that "Just My Code" is enabled. It's essential for this to work properly:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5504.image_5F00_2B12E3B3.png"&gt;&lt;img height="388" width="672" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0211.image_5F00_thumb_5F00_2B7F16A8.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;There's a lot of screenshots here, but this blog is rather narrow, so some of them are distorted &amp;ndash; you can click on them to see the full size version.&lt;/p&gt;
&lt;h4&gt;Scenario 1 &amp;ndash; Command Line only&lt;/h4&gt;
&lt;p&gt;First, enable the undocumented "/debug" switch on MSBuild.exe by setting the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\4.0 key to have debuggerenabled=true, as I've done here with reg.exe in an elevated Visual Studio prompt:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3060.image_5F00_2AD5204A.png"&gt;&lt;img height="91" width="863" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6014.image_5F00_thumb_5F00_61264859.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;You should now have these keys, assuming C: is your system drive.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8625.image_5F00_5FEFC323.png"&gt;&lt;img height="152" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8713.image_5F00_thumb_5F00_78AF1033.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Run MSBuild /? and you'll see the new switch has appeared. &lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4428.image_5F00_79F3A912.png"&gt;&lt;img height="117" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7635.image_5F00_thumb_5F00_73409F8F.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We are now ready to debug.&lt;/p&gt;
&lt;p&gt;Normally you'd be debugging some build process you've customized or authored, but for illustrative purposes I'm going to debug a brand new C# Windows Forms project. I'm going to build it with the /debug switch, and it will immediately stop:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0456.image_5F00_185E1DC8.png"&gt;&lt;img height="91" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3073.image_5F00_thumb_5F00_55AEF85C.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In my case I get a prompt to elevate, and hit Yes:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2043.image_5F00_017F1880.png"&gt;&lt;img height="318" width="589" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1768.image_5F00_thumb_5F00_61D03EB7.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Then I get the standard JIT debugging prompt. Make sure you check "Manually choose the debugging engines".&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8637.image_5F00_344F1EF4.png"&gt;&lt;img height="444" width="409" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4011.image_5F00_thumb_5F00_4697E5B6.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;that causes a dialog to appear to choose the debugging engine: you want Managed only. (Mixed will work, is more clunky.)&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5504.image_5F00_0DED3BA9.png"&gt;&lt;img height="309" width="404" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0207.image_5F00_thumb_5F00_1C2BB499.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And you are now debugging!&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8637.image_5F00_7C7CDAD0.png"&gt;&lt;img height="382" width="684" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7658.image_5F00_thumb_5F00_15E4DE0B.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The first thing to notice is that we are right at the top of the first project file, the very first line MSBuild is evaluating. You are breaking in automatically at the very start, as if you started debugging a regular application with "F11".&amp;nbsp; Well, almost the very start: MSBuild already read in the environment and its other initial settings:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/5187.image_5F00_366C1DBD.png"&gt;&lt;img height="327" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4024.image_5F00_thumb_5F00_7DC173AF.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now hit F10 and you will step line by line:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1307.image_5F00_504053EC.png"&gt;&lt;img height="184" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2451.image_5F00_thumb_5F00_1795A9DF.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you step over properties, you'll see the locals window is updating:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8540.image_5F00_30FDAD19.png"&gt;&lt;img height="136" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0726.image_5F00_thumb_5F00_3F3C2609.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8244.image_5F00_5FC365BB.png"&gt;&lt;img height="62" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1803.image_5F00_thumb_5F00_06FDAEF1.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you probably know, MSBuild evaluates in &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/dd997067.aspx"&gt;&lt;span style="color: #0066dd;"&gt;passes&lt;/span&gt;&lt;/a&gt;. The first pass evaluates just properties, pulling in any imports as they're encountered. Try to set a breakpoint (F9) on an item tag right now &amp;ndash; you can't! MSBuild is unaware of them at this point. &lt;/p&gt;
&lt;p&gt;Set a breakpoint on the &amp;lt;Import&amp;gt; tag at the bottom and run to it (F5):&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1616.image_5F00_674ED528.png"&gt;&lt;img height="260" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2870.image_5F00_thumb_5F00_19B2A8A8.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now step in (F11). You'll enter the file that's being imported, which in this case is Microsoft.CSharp.targets.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4034.image_5F00_331AABE2.png"&gt;&lt;img height="253" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3750.image_5F00_thumb_5F00_4C82AF1C.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The Callstack window shows that jump like a function call, including the location in the file:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0638.image_5F00_61E06484.png"&gt;&lt;img height="96" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3858.image_5F00_thumb_5F00_14443804.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Of course, &amp;lt;Import&amp;gt; does not have the semantics of a function call at all. Like an #include in C++, it simply logically inserts the content of another file. But I chose to make it work this way so that you can see the chain of imports in the Callstack window and figure out your context.&lt;/p&gt;
&lt;p&gt;By setting some more breakpoints on Imports and doing step-into, I can go deeper to illustrate:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3056.image_5F00_5B998DF6.png"&gt;&lt;img height="135" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4540.image_5F00_thumb_5F00_0DFD6176.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;To get past the property pass, given that I can't set a breakpoint on items yet, I'll use a trick. I'll Step Out repeatedly (Shift-F11) until we get to the project file again, then step to get to the next pass, which is &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/bb651788.aspx"&gt;&lt;span style="color: #0066dd;"&gt;Item Definitions&lt;/span&gt;&lt;/a&gt;. The C++ build process uses Item Definitions a great deal, but they're not very interesting for C#, in fact there's only one:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3343.image_5F00_1C3BDA66.png"&gt;&lt;img height="114" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7178.image_5F00_thumb_5F00_2A7A5356.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Use the same trick to get to the Item pass, and we'll get to the first item. I've then set a breakpoint to illustrate that I can do that now.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/4442.image_5F00_2EF0D41D.png"&gt;&lt;img height="247" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6082.image_5F00_thumb_5F00_24337CC8.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Conditional Breakpoints work too, by the way as I believe do Trace Points.&lt;/p&gt;
&lt;p&gt;Stepping a bit further, I can see items in the locals window, and also their metadata. A small bug here -- ignore the red message, and go into "Non-public members" to see the names and values:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/1200.image_5F00_5DB68CBF.png"&gt;&lt;img height="66" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0245.image_5F00_thumb_5F00_6BF505AF.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6518.image_5F00_505079B9.png"&gt;&lt;img height="188" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3377.image_5F00_thumb_5F00_17A5CFAC.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sometimes you'll want to figure what a condition evaluates to at the current moment. To do that, in the immediate window, pass the condition to the function EvaluateCondition:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2705.image_5F00_181202A1.png"&gt;&lt;img height="123" width="565" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6012.image_5F00_thumb_5F00_58481C1B.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;It's much the same if you want to evaluate (expand) an expression, but the function is named EvaluateExpression:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3872.image_5F00_51951298.png"&gt;&lt;img height="62" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/3465.image_5F00_thumb_5F00_0DC0DE41.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This is also a convenient way to see what a property value is, or what's in an item list, without navigating through the locals window. &lt;em&gt;Be sure to escape any slashes&lt;/em&gt;, as I've done here. &lt;/p&gt;
&lt;p&gt;The Autos window doesn't work, but Watch does:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/0654.image_5F00_070DD4BE.png"&gt;&lt;img height="112" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/7585.image_5F00_thumb_5F00_005ACB3B.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the Immediate window you can change almost any project state during the build, using the new object model. For example, I'll modify this property while I'm stopped here:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6012.image_5F00_60ABF172.png"&gt;&lt;img height="85" width="573" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/6505.image_5F00_thumb_5F00_72F4B834.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;You can do a lot through the new object model, so it's very useful to be able to call it here.&lt;/p&gt;
&lt;p&gt;My Watch window updated to match:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/2308.image_5F00_2F2083DD.png"&gt;&lt;img height="66" width="644" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-29-92-metablogapi/8267.image_5F00_thumb_5F00_6F569D57.png" alt="image" border="0" title="image" style="display: inline; border: 0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;That's the end of what I'm going to show for debugging MSBuild evaluation.&lt;/p&gt;
&lt;h5&gt;How it works&lt;/h5&gt;
&lt;p&gt;What's happening at the high level (you can find out more from Mike's blog) is that MSBuild is pretending the script is actually VB or C#. It's doing this by emitting IL on the fly that's semantically equivalent to what it's really doing as it goes through the XML. The code of MSBuild itself is of course optimized, so Just My Code hides it, but conveniently the IL isn't optimized, so it shows up. Inside the IL MSBuild emits line directives that point to the right place in the project file, completing the trick. As for the "locals", they're actually parameters passed to functions in the IL so that they appear. EvaluateCondition and EvaluateExpression are just delegates passed the same way.&lt;/p&gt;
&lt;p&gt;As such, a large part of the basic features you get with the regular VB/C# debugger just work. Some that don't: hovering over an expression doesn't give you the result; you can't just use the "?" syntax in the immediate window; Threads and Processes windows don't make sense; I doubt Intellitrace works. Plus, there's some of our internals leaking out in the windows here and there. But by using this trick, it was vastly less work to get the basics of an integrated debugger. I believe I spent a day or two tidying up Mike's sample code, and another three days wiring it straightforwardly into MSBuild. Creating a real debugger engine would be much more costly; and something comparable with what you get for C# would be fantastically costly, so I expect that long term, this will be the MSBuild debugging story. I hope you'll agree it's a lot better than staring at XML and logs or adding &amp;lt;Message&amp;gt; tags. &lt;/p&gt;
&lt;h5&gt;In my next post I'm going to cover&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Debugging during the build &amp;ndash; ie., debugging what happens inside targets, and project references; &lt;/li&gt;
&lt;li&gt;Debugging a multiprocessor build; &lt;/li&gt;
&lt;li&gt;Debugging the build of projects loaded into Visual Studio &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See you then!&lt;/p&gt;
&lt;p&gt;Dan&lt;/p&gt;
&lt;p&gt;Visual Studio Project &amp;amp; Build Dev Lead&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10035792" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Debugging/">Debugging</category></item><item><title>Better Parallelism in MSBuild 4 with YieldDuringToolExecution</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/06/03/better-parallelism-in-msbuild-4-with-yieldduringtoolexecution.aspx</link><pubDate>Thu, 03 Jun 2010 07:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10019871</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10019871</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/06/03/better-parallelism-in-msbuild-4-with-yieldduringtoolexecution.aspx#comments</comments><description>&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In MSBuild 4 we introduced several performance improvements, particular for large interdependent builds.&amp;nbsp; By and large they are automatic and you receive their benefit without making any changes to the way your build process in authored.&amp;nbsp; However, there are still some cases where we are unable to make the best decision.&amp;nbsp; One such case is when there is a particular external tool which is invoked as part of the build but which takes a significant amount of time.&amp;nbsp; An example of such a tool would be cl.exe, the C++ compiler.&amp;nbsp; This article discusses how to use the new yield mechanism for external tools to improve the performance of your builds.&lt;/p&gt;
&lt;h3&gt;Tool Tasks&lt;/h3&gt;
&lt;p&gt;There are a few ways MSBuild can be made to execute external, command-line tools:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write a task which derives from ToolTask. &lt;/li&gt;
&lt;li&gt;Use the Exec task to call your command. &lt;/li&gt;
&lt;li&gt;Use the XamlTaskFactory. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All of these methods ultimately use the ToolTask class in Microsoft.Build.Utilities.v4.0.dll to handle executing a command-line task and deal with the output in the MSBuild way.&amp;nbsp; Like all tasks, however, they block any other work from happening in MSBuild while they are executing.&amp;nbsp; In cases where the task is very short, such as touching a log file or copying a file from one place to another this is perfectly acceptable.&amp;nbsp; But in the original example of invoking the C++ compiler, the amount of time MSBuild itself sits idle can be lengthy and in some cases it may be a significant impediment to good parallelization of your build.&lt;/p&gt;
&lt;p&gt;The problem has to do with the way MSBuild utilizes its worker nodes.&amp;nbsp; Whenever a project is scheduled to be built, it is assigned to one of the worker nodes.&amp;nbsp; This node will then execute that project from start to finish, and will not accept more work until the project is either finished or the project makes an MSBuild call (for instance to satisfy a project-to-project reference.)&amp;nbsp; This is in large part because a node can only execute one task at a time, as tasks must be guaranteed their environment and current directory will not be modified during execution.&lt;/p&gt;
&lt;p&gt;However, command-line tools do not execute in-process, and therefore their environment cannot be polluted by the running of additional tasks in parallel on the same node.&amp;nbsp; We can take advantage of this behavior to let the MSBuild node execute tasks in other projects while our long-running tool completes its work.&amp;nbsp; This is done using the YieldDuringToolExecution parameter.&lt;/p&gt;
&lt;h3&gt;YieldDuringToolExecution&lt;/h3&gt;
&lt;p&gt;In order to allow MSBuild to continue building other projects while a command-line tool in one project is running is simple.&amp;nbsp; Just set the YieldDuringToolExecution parameter to &amp;lsquo;True&amp;rsquo; on your long running command-line tool.&amp;nbsp; This is a boolean parameter, so any valid MSBuild expression which resolves to a boolean value will work.&amp;nbsp; Here&amp;rsquo;s an example:&lt;/p&gt;
&lt;table bgcolor="#eeeeee" cellpadding="2" cellspacing="0" border="0" style="width: 564px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="562" valign="top"&gt;
&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&amp;lt;PropertyGroup&amp;gt;
    &amp;lt;YieldDuringToolExecution&amp;gt;true&amp;lt;/YieldDuringToolExecution&amp;gt;&lt;br /&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;
&amp;lt;Exec CommandLine=&amp;rdquo;Sleep 10000&amp;rdquo; YieldDuringToolExecution=&amp;rdquo;$(YieldDuringToolExecution)&amp;rdquo;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;When the Exec task executes, normally it would sleep for 10000 seconds during which no other work on the node can proceed.&amp;nbsp; However, with yielding enabled, the Sleep command will still run but the MSBuild node will be free to do other work.&amp;nbsp; Once the Sleep command is finished, the node will resume building the project which launched it as soon as the node is free to do so.&lt;/p&gt;
&lt;p&gt;Whether or not you should enable yielding for your ToolTasks depends on what they do.&amp;nbsp; Generally speaking if the task runs for less than one second, it&amp;rsquo;s probably not worth it to enable this since there is a small cost to give up the MSBuild node.&amp;nbsp; However, for longer tools you may see some wins, and the wins will likely be larger the more complex your build is and the more long running tasks you have in it.&amp;nbsp; Again, large interdependent C++ builds are a great example of this and they benefit tremendously from yielding being applied to the compiler.&amp;nbsp; You can investigate your build&amp;rsquo;s performance using the &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/03/05/msbuild-4-detailed-build-summary.aspx"&gt;&lt;span style="color: #0066dd;"&gt;Detailed Summary&lt;/span&gt;&lt;/a&gt; feature of MSBuild 4.&lt;/p&gt;
&lt;p&gt;Yielding interacts well with the /m switch in MSBuild as well.&amp;nbsp; For instance, if you have specified /m:4 to enable parallelization, MSBuild will ensure that no more than four parallel things are going on at once, whether they be regularly building projects or yielding tools.&amp;nbsp; So enabling yielding will not cause your machine to become more overloaded.&amp;nbsp; Instead your builds are likely to improve their parallelization and make better use of available CPU and I/O cycles that they would otherwise.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;We have already enabled yield semantic for several tool tasks.&amp;nbsp; These include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CL, the C++ compiler &lt;/li&gt;
&lt;li&gt;MIDL, the IDL compiler &lt;/li&gt;
&lt;li&gt;Link, the native linker &amp;ndash; Only when the LinkTimeCodeGeneration metadata is set to UseLinkTimeCodeGeneration &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It could also be enabled for the Vbc and Csc tasks since they are ToolTasks as well, but this support is not in the Microsoft.CSharp.targets and Microsoft.VisualBasic.targets shipped with .Net 4.0.&amp;nbsp; You could easily add them yourself if you wished.&amp;nbsp; More generally, if you include Microsoft.Common.targets the YieldDuringToolExecution property will be set to true unless it is overridden with the parameter /p:YieldDuringToolExecution=false being passed to MSBuild.&amp;nbsp; We will continue to use this property as the basis for selecting the tool parameter value of the same name.&lt;/p&gt;
&lt;h3&gt;Why isn&amp;rsquo;t it automatic?&lt;/h3&gt;
&lt;p&gt;Unfortunately for MSBuild 4 we didn&amp;rsquo;t get the opportunity to make this system as automatic as we would like.&amp;nbsp; In future versions we would like to automatically yield when ToolTasks are executing if they look like they will last longer than a certain threshold.&amp;nbsp; This will also work together with additional automatic improvements in build analysis and scheduling we have planned.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cliff Hudson&lt;/strong&gt; - MSBuild Developer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10019871" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/cliff+hudson/">cliff hudson</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Performance/">Performance</category></item><item><title>Assembly Resolution in MSBuild and Visual Studio Series Introduction</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/05/11/assembly-resolution-in-msbuild-and-visual-studio-series-introduction.aspx</link><pubDate>Tue, 11 May 2010 12:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10011581</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10011581</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/05/11/assembly-resolution-in-msbuild-and-visual-studio-series-introduction.aspx#comments</comments><description>&lt;span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: 12px; color: rgb(51, 51, 51); line-height: 18px; "&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Assembly references are an integral part of build process. When the assembly references passed to the compiler are correct everything works but when they are not projects stop building.&amp;nbsp; When this happens It can be frustrating to try and figure out why a reference was resolved from one location rather than another thereby causing the problem. In this series we will be detailing what steps are taken to take a reference from the project file and turn it into the path on disk that is passed to the compilers.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;This series will be focusing on the MSBuild task ResolveAssemblyReference. This task does the work of taking references declared in project files and turning them into paths on disk.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;The reason we discuss this task is because this same task is used by both MSBuild on the commandline and Visual Studio to find the references. Internally Visual Studio uses MSBuild as its build engine, so even though this series focuses on the behavior in MSBuild, it behaves exactly the same way in Visual Studio.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;b&gt;Outline for the of the assembly resolution series.&lt;/b&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Part 1&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In part one we will discuss how references are represented inside of the project file. This will give a basic understanding when looking at a project file of the different forms a reference can take (e.g. file path, simple name, or fusion name) and the additional attributes that can be set on those references.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Part 2&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In part two we will discuss some of the basic inputs to the ResolveAssemblyReference task. Why these inputs are important and how they affect how references are found is outlined. This post also goes into detail about how a reference is resolved and the different kinds of algorithms involved in turning what is represented in the project file into a path on disk.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Part 3&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In part three we discuss the AssemblyFoldersEx registry location. This is just one of the places where references can be resolved from, however it is one of the most complicated locations due to how the location is searched. This section will discuss the layout of the registry keys and the algorithms used to find assemblies which are declared in this location.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Part 4&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In part four we will discuss how conflicts between dependent assemblies arise and how they are dealt with. This section will provide an understanding of why conflict warnings occur and how they can be prevented or disabled. This part also discusses how the determination as to whether or not an assembly should be copied to the output directory is made. This is partially dependent on the resolution of conflicts between dependent assemblies and for this reason is in the same section.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Part 5&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In part five we will discuss how the target framework moniker represented in the project file is used to generate a list of directories which represent the framework that the project is targeting. We also discuss the new multi-targeting rules that were introduced in MSBuild 4.0 to prevent users from referencing framework assemblies which are not part of the framework their project is targeting.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Part 6&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In part six we will discuss the ResolveAssemblyReference task logging output. It logs a large amount of information about why it resolves references a certain way. This information is very useful when trying to determine why a reference was not resolved when it was expected to resolve or why one reference was picked from a certain location when it was expected to come from another.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;Chris Mann&lt;/strong&gt;&amp;nbsp;– Developer, MSBuild&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10011581" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Chris+Mann/">Chris Mann</category></item><item><title>Building on Cross targeting scenarios and 64-bit MSBuild</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/05/07/building-on-cross-targeting-scenarios-and-64-bit-msbuild.aspx</link><pubDate>Fri, 07 May 2010 19:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10010121</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10010121</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/05/07/building-on-cross-targeting-scenarios-and-64-bit-msbuild.aspx#comments</comments><description>&lt;span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: 12px; color: rgb(51, 51, 51); line-height: 18px; "&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;During the Visual Studio 2010 development cycle a push to make the build experience better on Cross compilation scenarios as well on making sure a build using 32-bit MSBuild was identical (in outputs) to a build using 64-bit MSBuild.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In most cases, 64-bit and 32-bit MSBuild will indeed produce the same output. However there are some cases, generally cross compilation scenarios, where this is not the case.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Note that since Visual Studio is a 32-bit application, if you build from Visual Studio, it is equivalent to running the 32-bit MSBuild.&lt;/p&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;ResolveAssemblyReference: Reference resolution ignores Processor Architecture except when resolving from the Global Assembly Cache&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;If you have two assemblies whose identities differ only by the processor architecture, i.e.&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;myTypes, Version=1.0.1234.0, Culture=en-US, PublicKeyToken=b77a5c561934e089c, ProcessorArchitecture=msil&amp;nbsp;&lt;br&gt;myTypes, Version=1.0.1234.0, Culture=en-US, PublicKeyToken=b77a5c561934e089c, ProcessorArchitecture=x86&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;And you try to reference one of them specifically:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;&amp;lt;Reference Include="myTypes, Version=1.0.1234.0, Culture=en-US,&amp;nbsp; PublicKeyToken=b77a5c561934e089c, ProcessorArchitecture=x86"/&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;You will notice that the first reference found will be picked up.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;It will also cause the CopyLocal property being set to false.&lt;/p&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Building with MSBuild 32-bit or 64-bit.&lt;/p&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Add your affected references to the Global Assembly Cache. See&amp;nbsp;&lt;a mce_href="http://support.microsoft.com/kb/315682" style="color: rgb(54, 109, 244); text-decoration: none; " href="http://support.microsoft.com/kb/315682"&gt;KB315682 on how to do that&lt;/a&gt;.&lt;/p&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;64-bit MSBuild is not able to find VCBuild.exe while building a VC++ 3.5 solution&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;You keep facing the following error:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;Build FAILED.&lt;/em&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;"mysolution.sln" (Rebuild target) (1) -&amp;gt;(mcpplib1:Rebuild target) -&amp;gt;&amp;nbsp;&lt;br&gt;&amp;nbsp; MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 Warning(s)&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 Error(s)&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Building with MSBuild 64-bit only.&lt;/p&gt;&lt;p mce_keep="true" style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In order to properly build solutions with MSBuild containing 3.5 and earlier VC++ project files (*.vcproj) the PATH environment variable should contain the path to VCBuild.exe, which happens to be a 32-bit only executable. To build with 64-bit MSBuild you should point to the location under “Program Files (x86)” path.&lt;/p&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;LC.exe causes build failures while building AMD64 configurations inside Visual Studio&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;When building the AMD64 configuration of a solution, LC.exe is being picked up from %&lt;strong&gt;Program Files (x86)%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\LC.exe&lt;/strong&gt;&amp;nbsp;instead of being picked of from %&lt;strong&gt;Program Files (x86)%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\LC.exe.&amp;nbsp;&lt;/strong&gt;Or if you are using Visual Studio 2008, from the directory&amp;nbsp;&lt;strong&gt;%Program Files%\Microsoft SDKs\Windows\v6.0A\bin&lt;/strong&gt;.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;This will make you face an error like this:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;LC : error LC0000: 'Could not load file or assembly 'MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.'&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;This issue is caused by the fact that LC.exe is not able to satisfy the Cross-Compilation scenarios because of some specific requirements on how it needs to load the referenced dynamic libraries.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;NOTE: your build will succeed if you use 64-bit MSBuild on the command line.&lt;/p&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Cross compilation scenarios. Building x64 platforms with 32-bit MSBuild or x86 platform with 32-bit MSBuild.&lt;/p&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Your build will succeed if you use 64-bit MSBuild in the command line, however if you still want to build inside Visual Studio IDE you can use the following to your project file (by manually editing it):&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;&amp;lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;&lt;strong&gt;&amp;lt;LCToolPath&amp;gt;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\x64&amp;lt;/LCToolPath&amp;gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h3&gt;RegisterAssembly task fails on Cross targeting scenarios&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;If you have a project in your solution targeted to build an x64 platform and you:&lt;/p&gt;&lt;ul style="margin-left: 0px; padding-left: 2em; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; "&gt;&lt;li&gt;set it to be registered for COM Interop (on the Project Build properties)&lt;/li&gt;&lt;li&gt;or set the RegisterForComInterop property in the project file to true&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;You will face the following issue while building it:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;Error 1 File "MyDll.dll" is not a valid assembly. C:\Windows\Microsoft.NET\Framework\v4.0.20904\Microsoft.Common.targets 3257 9 ClassLibrary3&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;MSBuild cannot register a library for COM Interop if its architecture does not match the architecture of the MSBuild.exe (or DevEnv.exe) hosting the build process.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;So on a 64-bit OS, the following scenarios will not work when the RegisterAssembly task is invoked as part of the build:&lt;/p&gt;&lt;ul style="margin-left: 0px; padding-left: 2em; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; "&gt;&lt;li&gt;In the IDE the user changes the platform of the project to x64 and builds&lt;/li&gt;&lt;li&gt;In the command line, 32-bit MSBuild will fail to build a project targeting a x64 platform&lt;/li&gt;&lt;li&gt;In the command line, 64-bit MSBuild will fail to build a project targeting the x86 platform&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Cross compilation scenarios. Building x64 platforms with 32-bit MSBuild or x86 platform with 32-bit MSBuild.&lt;/p&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;You need to match the architecture of MSBuild.exe with the platform you are attempting to build, or&lt;/li&gt;&lt;li&gt;Instead of setting the “RegisterForComInterop” property to true, add a custom step to your build that runs RegAsm.exe to register your COM library. It must run the version of RegAsm.exe that matches the architecture of your library. For details on how to add a custom build step,&amp;nbsp;&lt;a style="color: rgb(54, 109, 244); text-decoration: none; " href="http://msdn.microsoft.com/en-us/library/ms366724.aspx"&gt;see here&lt;/a&gt;. Or follow this steps:&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;In the project properties, select “Build Events…” from the compile page.&lt;/li&gt;&lt;li&gt;Add the following post build command line: "%Windir%\Microsoft.NET\&lt;strong&gt;Framework[64]&lt;/strong&gt;\&lt;strong&gt;v4.0.xxxxx&lt;/strong&gt;\regasm" "$(TargetPath)"&lt;ul style="margin-left: 0px; padding-left: 2em; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; "&gt;&lt;li&gt;Be careful to select the Framework directory that matches the architecture you are targeting&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;COM references are not resolved on cross targeting scenarios&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;If you have a COM object registered by using regsvr32.exe, consider that there is a 32-bit and 64-bit regsvr32.exe. If you used 32-bit regsvr32.exe to register your COM object and you are attempting to build a project targeting x86 platform but using 64-bit MSBuild. The build will fail, this issue is caused by the fact that the library was registered with a pure 32-bit regsvr32.exe and thus it only registers the component under the WOW registry section, that is invisible to 64-bit processes that do not attempt an explicit look up on the WOW nodes.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;The opposite is also true, using the 64-bit regsvr32.exe to register the library and attempting to build a project targeting a x64 platform with 32-bit MSBuild. This process has no way to access the 64-bit part of the registry.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;One manifestation of this issue would be if your build is failing with an AxImp error when building a project that consumes a registered PIA of an ActiveX control:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;Build FAILED.&amp;nbsp;&lt;br&gt;"ActiveXWithPiaConsumer.csproj" (default target) (1) –&amp;gt; (ResolveComReferences target) -&amp;gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp; C:\Windows\Microsoft.NET\Framework64\v4.0.21112\Microsoft.Common.targets(1543,9): warning MSB3283: Cannot find wrapper assembly for type library "AxActiveXControlLib". [ActiveXWithPiaConsumer.csproj]&amp;nbsp;&lt;br&gt;"ActiveXWithPiaConsumer.csproj" (default target) (1) –&amp;gt; (ResolveComReferences target) -&amp;gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp; AXIMP : AxImp error : Did not find a registered ActiveX control in 'ActiveXWithPia\ActiveXControl.dll'. [ActiveXWithPiaConsumer.csproj]&lt;/em&gt;&lt;/p&gt;&lt;p mce_keep="true" style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;Affected scenarios:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Mismatches between the architecture of the regsvr32.exe used to register the library and the architecture of MSBuild used to build:&lt;/p&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;32-bit regsvr32.exe and 64-bit MSBuild.exe&lt;/li&gt;&lt;li&gt;64-bit regsvr32.exe and 32-bit MSBuild.exe&lt;/li&gt;&lt;/ol&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;NOTE: if you are using a 32-bit only COM object while trying to build a x64 platform the Interop assembly cannot be generated, and the same applies if you are using a 64-bit only COM object and you are trying to build the x86 platform.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;Workaround:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Build using a matching MSBuild architecture with the architecture of regsvr32 and the platform to build:&lt;/p&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;You want to build the x86 platform, use 32-bit MSBuild + 32-bit regsvr32.exe.&lt;/li&gt;&lt;li&gt;You want to build a x64 platform, use 64-bit MSBuild + 64-bit regsvr32.exe.&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Cannot build Silverlight project targeting a x64 platform or using 64-bit MSBuild&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;You have a Silverlight project and you change the platform to x64. You might face one of the following errors:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;The "ValidateXaml" task failed unexpectedly.&amp;nbsp;&lt;br&gt;System.BadImageFormatException: Could not load file or assembly 'obj\x64\Debug\SilverlightApplication1.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;or if you are building using 64-bit MSBuild:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;"SilverlightApplication1.csproj" (GetXapOutputFile target) (2:2) -&amp;gt;&amp;nbsp;&lt;br&gt;&amp;nbsp; C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(101,9): error : The Silverlight 3 SDK is not installed. [SilverlightApplication1.csproj]&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;Attempts to build a Silverlight project targeting a x64 platform with either 32-bit or 64-bit MSBuild.&lt;/li&gt;&lt;li&gt;Attempts to build a Silverlight project with 64-bit MSBuild.&lt;/li&gt;&lt;/ol&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;No workaround. Silverlight DOES NOT support x64 platforms. And Silverlight projects cannot be built by 64-bit MSBuild. You must use the 32-bit MSBuild and target x86 or AnyCPU platforms to build your Silverlight projects.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;If you are using Team Build select x86 for the MSBuild platform setting.&lt;/p&gt;&lt;h3&gt;Interop assemblies are not generated correctly if the project targets the default platform&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;If you have a class library project (for example) and you haven’t changed the platform of the project, it will be targeting the AnyCPU platform. However if you add a reference to a COM object you will find out that the generated Interop assembly is specifically targeting the x86 platform.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;This is because Interop assemblies always have an explicit target platform, and in the absence of an explicit platform from the project consuming the Interop assembly this target platform is defaulted to the value of an Environment Variable named “PROCESSOR_ARCHITECTURE”, which inside Visual Studio IDE it evaluates to the x86 platform.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;The effect of this is that if your application (targeting AnyCPU platform) is run in a 64-bit Operating System, it will run as a 64-bit process and the will fail to load the Interop assembly.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Note that applications built as AnyCPU will always run as 64-bit under a 64-bit Operating System, no matter if you launch them from a 64-bit or 32-bit command window.&lt;/p&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Projects targeting the default platform and consuming Interop assemblies. This will happen either with 32-bit and 64-bit MSBuild.&lt;/p&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Explicitly set the platform on your project or manually add it to the project by defining the PlatformTarget property to your configuration block in the project file:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;&lt;strong&gt;&amp;nbsp; &amp;lt;PlatformTarget&amp;gt;AnyCPU&amp;lt;/PlatformTarget&amp;gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p mce_keep="true" style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;An error occurs when compiling a .resx file MSBuild&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;On a 64-bit OS you have a project targeting the x86 platform and it targets 3.5 .NET Framework or below. Your project has a reference to a 32-bit only assembly, and when you build you get the following error:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;ResourceFrm.resx(1436,5): error RG0000: Could not load file or assembly '32bitOnlyAssembly.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Line 1436, position 5.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;This issue is caused by the fact that in the 3.5 .NET tools resgen.exe in both the x86 and x64 bin directories is marked as IL (architecture agnostic), causing it to run on a 64-bit Operating System as a64-bit executable no matter what. As a 64-bit process, resgen.exe is unable to load the 32-bit only library.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Also if you are targeting 4.0 .NET, MSBuild will fail in the same way if you are referencing a 32-bit only assembly while using 64-bit MSBuild and vice versa.&lt;/p&gt;&lt;h5&gt;Affected scenarios:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Cross targeting scenarios while building projects which contain resource files with MSBuild:&lt;/p&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;In a 64-bit Operating System If you are targeting 3.5 .NET and the project references a 32-bit assembly with either 32-bit or 64-bit MSBuild.&lt;/li&gt;&lt;li&gt;The project references a 32-bit assembly and you are using 64-bit MSBuild.&lt;/li&gt;&lt;li&gt;The project references a 64-bit assembly and you are using 32-bit MSBuild.&lt;/li&gt;&lt;/ol&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Make the library referred on the error target the AnyCPU platform&lt;/p&gt;&lt;h3&gt;Cannot build SQL Server project using 64-bit MSBuild&lt;/h3&gt;&lt;h5&gt;Description:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;You have a SQL server project and you attempt to build it using 64-bit MSBuild, the following error is displayed:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;em&gt;&amp;nbsp; SqlServerProject1.vbproj(149,3): error MSB4019: The imported project "C:\Windows\Microsoft.NET\Framework64\v4.0.xxxxx\SqlServer.targets" was not found. Confirm that the path in the &amp;lt;Import&amp;gt; declaration is correct, and that the file exists on disk.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h5&gt;Workaround:&lt;/h5&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Copy C:\Windows\Microsoft.NET\&lt;strong&gt;Framework64\v4.0.xxxxx\&lt;/strong&gt;SqlServer.targets to C:\Windows\Microsoft.NET\&lt;strong&gt;Framework\v4.0.xxxxx&lt;/strong&gt;\SqlServer.targets&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;Daniel Estrada&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;&lt;/strong&gt;Software Development Engineer in Test,&amp;nbsp;&lt;em&gt;MSBuild Team&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10010121" width="1" height="1"&gt;</description></item><item><title>MSBuild Property Functions (2)</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/05/05/msbuild-property-functions-2.aspx</link><pubDate>Wed, 05 May 2010 20:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10008281</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=10008281</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/05/05/msbuild-property-functions-2.aspx#comments</comments><description>&lt;span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: 12px; color: rgb(51, 51, 51); line-height: 18px; "&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Some more information about this 4.0 feature. (I've also updated the first post with this, so everything's in one place for your reference.)&lt;/p&gt;&lt;h4&gt;Built-in MSBuild functions&lt;/h4&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;The full list of built-in [MSBuild] functions, like the one above, are in the MSDN topic&amp;nbsp;&lt;a target="_blank" style="color: rgb(54, 109, 244); text-decoration: none; " href="http://msdn.microsoft.com/en-us/library/dd633440.aspx"&gt;here&lt;/a&gt;. They include arithmetic (useful, for example, for modifying version numbers), functions to convert to and from the MSBuild&amp;nbsp;&lt;a target="_blank" style="color: rgb(54, 109, 244); text-decoration: none; " href="http://msdn.microsoft.com/en-us/library/bb383819.aspx"&gt;escaping format&lt;/a&gt;&amp;nbsp;(on rare occasions, that is useful). Here's another example&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;$([MSBuild]::Add($(VersionNumber), 1))&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;And here's one other property function that will be useful to some people:&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;$([MSBuild]::GetDirectoryNameOfFileAbove(&lt;em&gt;directory, filename)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Looks in the designated directory, then progressively in the parent directories until it finds the file provided or hits the root. Then it returns the path to that root. What would you need such an odd function for? It's very useful if you have a tree of projects in source control, and want them all to share a single imported file. You can check it in at the root, but how do they find it to import it? They could all specify the relative path, but that's cumbersome as it's different depending on where they are. Or, you could set an environment variable pointing to the root, but you might not want to use environment variables. That's where this function comes in handy – you can write something like this, and all projects will be able to find and import it:&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;&amp;nbsp; &amp;lt;Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), EnlistmentInfo.props))' != '' " /&amp;gt;&lt;/strong&gt;&lt;/p&gt;&lt;h4&gt;Error handling&lt;/h4&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;The functions parser is pretty robust but not necessarily that helpful when it doesn't wokr. Errors you can get include&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;(1) It doesn't evaluate but just comes out as a string. Your syntax isn't recognized as an attempt at a function, most likely you've missed a closing parenthesis somewhere. That's easy to do when there's lots of nesting.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;(2)&amp;nbsp;&lt;em&gt;&lt;strong&gt;error MSB4184: The expression "…" cannot be evaluated.&lt;/strong&gt;&amp;nbsp;&lt;/em&gt;It treated it as a function, but probably it couldn't parse it.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;(3)&amp;nbsp;&lt;em&gt;&lt;strong&gt;error MSB4184: The expression "…" cannot be evaluated. Method '…' not found.&lt;/strong&gt;&amp;nbsp;&lt;/em&gt;It could parse it, but not find a member it could coerce to, or it was considered ambiguous by the binder. Verify you weren't calling a static member using instance member syntax. Try to make the call less ambiguous between overloads, either by picking another overload (that perhaps has a unique number of parameters) or using the Convert class to force one of the parameters explicitly to the type the method wants. One common case where this happens is where one overload takes an integer, and the other an enumeration.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;(4)&amp;nbsp;&lt;em&gt;&lt;strong&gt;error MSB4184: The expression "[System.Text.RegularExpressions.Regex]::Replace(d:\bar\libs;;c:\Foo\libs;, \lib\x86, '')" cannot be evaluated. parsing "\lib\x86" - Unrecognized escape sequence \l.&lt;/strong&gt;&lt;/em&gt;&amp;nbsp; Here's an example where it bound the method, but the method threw an exception ("unrecognized escape sequence") because the parameter values weren't valid.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;(5)&amp;nbsp;&lt;em&gt;&lt;strong&gt;error MSB4186: Invalid static method invocation syntax: "....". Method 'System.Text.RegularExpressions.Regex.Replace' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`))..&lt;/strong&gt;&amp;nbsp;&lt;/em&gt;Hopefully this is self explanatory, but more often than a syntax mistake, you called an instance member using static member syntax.&lt;/p&gt;&lt;h4&gt;Arrays&lt;/h4&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Arrays are tricky as the C# style syntax "new Foo[]" does not work, and Array.CreateInstance needs a Type object. To get an array, you either need a method or property that returns one, or you use a special case where we can force a string into an array. Here's an example of the latter case:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;b&gt;$(LibraryPath.Split(`;`))&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;In this case, the string.Split overload wants a string array, and we're converting the string into an array with one element.&lt;/p&gt;&lt;h4&gt;Regex Example&lt;/h4&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Here I'm replacing a string in the property "LibraryPath", case insensitively.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;&amp;lt;LibraryPath&amp;gt;$([System.Text.RegularExpressions.Regex]::Replace($(LibraryPath), `$(DXSDK_DIR)&lt;/strong&gt;&lt;a style="color: rgb(54, 109, 244); text-decoration: none; " href="file://lib/x86%60"&gt;&lt;strong&gt;\\lib\\x86`&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, ``, System.Text.RegularExpressions.RegexOptions.IgnoreCase))&amp;lt;/LibraryPath&amp;gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;Here's how to do the same with string manipulation, less pretty.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;&amp;lt;LibraryPath&amp;gt;$(LibraryPath.Remove($(LibraryPath.IndexOf(`$(DXSDK_DIR)\lib\x86`, 0, $(IncludePath.Length), System.StringComparison.OrdinalIgnoreCase)), $([MSBuild]::Add($(DXSDK_DIR.Length), 8))))&amp;lt;/LibraryPath&amp;gt;&lt;/strong&gt;&lt;/p&gt;&lt;h4&gt;Future Thoughts&lt;/h4&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;So far in my own work I've found this feature really useful, and far, far, better than creating a task. It can make some simple tasks that were impossible possible, and often, easy. But as you can see from the examples above, it often has rough edges and sometimes it can be horrible to read and write. Here's some ways we can make it better in future:&lt;/p&gt;&lt;ol style="margin-left: 2em; padding-left: 0px; "&gt;&lt;li&gt;A "language service" would make writing these expressions much easier to get right. What that means is a better XML editing experience inside Visual Studio for MSBuild format files, that understands this syntax, gives you intellisense, and squiggles errors. (Especially missed closing parentheses!)&lt;/li&gt;&lt;li&gt;A smarter binder. Right now we're using the regular CLR binder, with some customizations. Powershell has a much more heavily customized binder, and I believe there is now one for the DLR. If we switch to that, it would be much easier to get the method you want, with appropriate type conversion done for you.&lt;/li&gt;&lt;li&gt;Some more methods in the [MSBuild] namespace for common tasks. For example, a method like $([MSBuild]::ReplaceInsensitive(`$(DXSDK_DIR)&lt;a style="color: rgb(54, 109, 244); text-decoration: none; " href="file://lib/x86%60"&gt;\\lib\\x86`&lt;/a&gt;, ``)) would be easier than the long regular expression example above.&lt;/li&gt;&lt;li&gt;Enable more types and members in the .NET Framework that are safe, and useful.&lt;/li&gt;&lt;li&gt;Make it possible to expose your own functions, that you can use with this syntax, but write in inline code like MSBuild 4.0&amp;nbsp;&lt;a target="_blank" style="color: rgb(54, 109, 244); text-decoration: none; " href="http://msdn.microsoft.com/en-us/library/dd722601.aspx"&gt;allows you to do for tasks&lt;/a&gt;. You'd write once, and use many.&lt;/li&gt;&lt;li&gt;Offer some similar powers for items and metadata.&lt;/li&gt;&lt;/ol&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;What do you think?&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; "&gt;&lt;strong&gt;Dan Moseley&lt;/strong&gt;&lt;br&gt;Developer Lead - MSBuild&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10008281" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Property+Functions/">Property Functions</category></item><item><title>A brief MSBuild Blog Note</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/04/18/a-brief-msbuild-blog-note.aspx</link><pubDate>Sun, 18 Apr 2010 11:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9998013</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9998013</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/04/18/a-brief-msbuild-blog-note.aspx#comments</comments><description>&lt;P&gt;Following extensive feedback on the decision to &lt;A href="http://blogs.msdn.com/msbuild/archive/2009/11/13/the-msbuild-team-blog-is-moving.aspx" mce_href="http://blogs.msdn.com/msbuild/archive/2009/11/13/the-msbuild-team-blog-is-moving.aspx"&gt;move the MSBuild blog&lt;/A&gt; to &lt;A href="http://blogs.msdn.com/visualstudio/default.aspx" mce_href="http://blogs.msdn.com/visualstudio/default.aspx"&gt;The Visual Studio Blog&lt;/A&gt;, a decision has been made to cross-post all MSBuild blog posts to this blog.&lt;/P&gt;
&lt;P&gt;All current MSBuild posts to The Visual Studio Blog have now been posted here. Apologies if you have received RSS notifications on content you may already have known about.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;Mike Fourie&lt;/STRONG&gt;&lt;BR&gt;Microsoft Visual Studio ALM MVP&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9998013" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category></item><item><title>MSBuild Property Functions</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/04/02/msbuild-property-functions.aspx</link><pubDate>Fri, 02 Apr 2010 14:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9998010</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9998010</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/04/02/msbuild-property-functions.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Have you ever wanted to do something simple in a build, like get a substring of a property value, and found that MSBuild didn't have syntax for it? You then had to write a task for it, which was tiresome to do for such a simple operation. What's more, if you wanted to do this during evaluation – outside of a target – you couldn't run a task there anyway.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In MSBuild 4.0 we addressed this by adding "property functions" which allow you to execute a variety of regular .NET API calls during evaluation or execution.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here's an example. For the default VB or C# project, both the intermediate and final output directories are by default below the project's directory. Instead, I'm going to move the final outputs to c:\outputs\&amp;lt;some guid&amp;gt;\ followed by the usual path. You can see below how I did this. I removed the &amp;lt;OutputPath&amp;gt; property and replaced it with an expression that generated a guid for this project.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb_1.png" width=874 height=381 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb_1.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Now I reopen the project and hit build to show it worked:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb_2.png" width=1067 height=101 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb_2.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;H2&gt;Syntax&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;There are two syntaxes, as follows. They're intended to be fairly close to the existing Powershell syntax for calling .NET types. The first is for calling static members:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=5 face=Consolas&gt;$([Namespace.Type]::Method(..parameters…))&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=5 face=Consolas&gt;$([Namespace.Type]::Property)&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=5 face=Consolas&gt;$([Namespace.Type]::set_Property(value))&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The second is for instance members on the String class. You write it as if the property itself is a string.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=5 face=Consolas&gt;$(property.Method(..parameters...))&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=5 face=Consolas&gt;$(property.Property)&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=5 face=Consolas&gt;$(property.set_Property(value))&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Notice that when setting a property, you must use CLR syntax for properties ("set_XXX(value)").&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The neat part is that these can all be nested – be sure to match your parentheses correctly of course. We attempt to coerce parameters as far as possible in order to find a method or overload that will work.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you want to pass strings, quote with back-ticks.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;When you pass the result of one expression to another, the types are maintained along the chain. This helps the binder find the member you are trying to call. Only when the final result of the expression needs to go into the build do we coerce it to a string.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Some examples may help:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=3 face=Consolas&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2&gt;Examples&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_12.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb_4.png" width=915 height=737 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb_4.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;H2&gt;Limitations&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;* You can't run instance methods on raw strings. For example $("c:\foo".get_Length()). They must go into a property first.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;* Out parameters won't work – there are no intermediate values except for the return value. No delegates or generics either.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;* If we coerce to the wrong overload, you may be able to use a Convert method to force the correct one.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;* By default, you can only call certain members on certain types – selected to be free of side-effects. Here's the full list:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;(1) All members on the following types:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;STRONG&gt;System.Byte&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Char&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Convert&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.DateTime&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Decimal&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Double&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Enum&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Guid&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Int16&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Int32&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Int64&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.Path&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Math&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.UInt16&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.UInt32&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.UInt64&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.SByte&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Single&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.String&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.StringComparer&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.TimeSpan&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Text.RegularExpressions.Regex&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Version&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;MSBuild&amp;nbsp; (see below)&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;Microsoft.Build.Utilities.ToolLocationHelper&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;(2) Selected members on certain other types:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;STRONG&gt;System.Environment::CommandLine&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Environment::ExpandEnvironmentVariables&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Environment::GetEnvironmentVariable&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Environment::GetEnvironmentVariables&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Environment::GetFolderPath&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.Environment::GetLogicalDrives&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.Directory::GetDirectories&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.Directory::GetFiles&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.Directory::GetLastAccessTime&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.Directory::GetLastWriteTime&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.Directory::GetParent&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.File::Exists&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.File::GetCreationTime&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.File::GetAttributes&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.File::GetLastAccessTime&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.File::GetLastWriteTime&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;System.IO.File::ReadAllText&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2&gt;But I want to use other types and custom types ..&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The reason we prevent this is to make it more safe to load Visual Studio projects. Otherwise, someone could give you a project that formatted your hard-disk during evaluation. Visual Studio load-time safety is actually more complicated than that – some targets will run and do arbitrary things – but we didn't want to make new opportunities for badness. We could have made this limitation only apply to Visual Studio, but then it would be possible to have your build work differently on the command line. I'd like to hear your feedback on this – is the list too constraining?&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;You can decide whether we made the correct call here. Meanwhile there is an&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;unsupported&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;way to call members on arbitrary types: set the environment variable MSBUILDENABLEALLPROPERTYFUNCTIONS=1. You can now use any type in any assembly. Of course, MSbuild has to know what assembly it is in (it knows them for the list above); and the CLR binder still has to be able to find it to load it.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;To figure out the assembly, it tries to work up the name. So for this example (assuming the environment variable is set)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;$([Microsoft.VisualBasic.FileIO.FileSystem]::CurrentDirectory)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;it will look for Microsoft.VisualBasic.FileIO.dll, then Microsoft.VisualBasic.dll (which it will find and load from the GAC) and you will get the value of the current directory.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If that's not going to work for your assembly, it is possible to pass in a strong name. For example, the above could equivalently be written like this:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;$([Microsoft.VisualBasic.FileIO.FileSystem, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]::CurrentDirectory)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;This means you can write your own functions for MSBuild to call – just put the assembly somewhere that the CLR can find it. By doing that, you can (if you set the environment variable) cause your build do do absolutely anything during property evaluation.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here's a screenshot of these examples:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb.png" width=1142 height=89 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/MSBuildPropertyFunctions_1334E/image_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Have fun, and let me know what you think. I'd love to get suggestions on how we can improve this.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;STRONG&gt;[Update]&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;I'll post about this separately later, but here's one other property function that will be useful to some people:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;$([MSBuild]::GetDirectoryNameOfFileAbove(&lt;EM&gt;directory, filename)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Looks in the designated directory, then progressively in the parent directories until it finds the file provided or hits the root. Then it returns the path to that root. What would you need such an odd function for? It's very useful if you have a tree of projects in source control, and want them all to share a single imported file. You can check it in at the root, but how do they find it to import it? They could all specify the relative path, but that's cumbersome as it's different depending on where they are. Or, you could set an environment variable pointing to the root, but you might not want to use environment variables. That's where this function comes in handy – you can write something like this, and all projects will be able to find and import it:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&amp;nbsp; &amp;lt;Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), EnlistmentInfo.props))' != '' " /&amp;gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;Dan Moseley&lt;/STRONG&gt;&lt;BR&gt;Developer Lead - MSBuild&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9998010" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category></item><item><title>Displaying Target Output Items Using The Console Logger</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/03/31/displaying-target-output-items-using-the-console-logger.aspx</link><pubDate>Wed, 31 Mar 2010 16:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9988238</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9988238</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/03/31/displaying-target-output-items-using-the-console-logger.aspx#comments</comments><description>&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;In previous versions of MSBuild users could see the initial item and property values of projects in the build, this was useful to diagnose what values certain properties and items were set to.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A requested addition to these items and properties was the ability to get view the values of the target output items on a target.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is useful because it allows the build author to view the state of the items being passed to the rest of the build from the target which has just completed.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;One of the features added in MSBuild 4.0 was the ability to retrieve the output items of a target when a target completes and display this information in a logger.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;This post is intended for two audiences, first.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If one wishes to enable the display of target output items in the default MSBuild console logger then the only action that is required is to set the environment variable &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;MSBUILDTARGETOUTPUTLOGGING&lt;/SPAN&gt;&lt;/B&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;to true&lt;B style="mso-bidi-font-weight: normal"&gt;. &lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Let us consider the following simple project which has a target that sets some outputs. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Note: In both cases we are using detailed logging&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;msbuild OutputLogging.proj /v:d&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;OutputLogging.proj&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;ToolsVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;4.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DefaultTargets&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Build&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;Build&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Outputs&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;@(TargetOutputs);$(AnotherOutput)&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;ItemGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;TargetOutputs&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;TargetOutPut1&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;TargetOutputs&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;TargetOutPut2&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;TargetOutputs&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;TargetOutPut3&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Metadata1&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;Metadata1&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Metadata1&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Metadata2&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;Metadata2&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Metadata2&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Metadata3&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;Metadata3&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Metadata3&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;TargetOutputs&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;ItemGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;AnotherOutput&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;AnotherOutput&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;AnotherOutput&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Here is what the log looks like when target output logging is not enabled. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Project "C:\OutputLogging\OutputLogging.proj" on node 1 (default targets).&lt;BR&gt;Building with tools version "4.0".&lt;BR&gt;Target "Build" in project "C:\OutputLogging\OutputLogging.proj" (entry point):&lt;BR&gt;Done building target "Build" in project "OutputLogging.proj".&lt;BR&gt;Done Building Project "C:\OutputLogging\OutputLogging.proj" (default targets).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Here is the output with the target output logging enabled using the msbuild console logger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Project "C:\OutputLogging\OutputLogging.proj" on node 1 (default targets).&lt;BR&gt;Building with tools version "4.0".&lt;BR&gt;Target "Build" in project "C:\OutputLogging\OutputLogging.proj" (entry point):&lt;BR&gt;Target output items:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TargetOutPut1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TargetOutPut2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TargetOutPut3&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Metadata1 = Metadata1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Metadata2 = Metadata2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Metadata3 = Metadata3&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AnotherOutput&lt;BR&gt;Done building target "Build" in project "OutputLogging.proj".&lt;BR&gt;Done Building Project "C:\OutputLogging\OutputLogging.proj" (default targets).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;As you can see we now see the output items when the target finished event is logged.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;The second intended audience are authors of custom loggers.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;To get access to the target outputs in ones custom logger a new property on the TargetFinishedEventArgs has been added called TargetOutputs.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This property is normally not set to anything, we chose not to enable the logging of the TargetOutputs by default because it does cause a performance hit due to additional object serialization during a multi-process build.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;When the environment variable&lt;B style="mso-bidi-font-weight: normal"&gt; &lt;/B&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;MSBUILDTARGETOUTPUTLOGGING&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt; is set to true this field will be populated with a set of ITaskItems which are the output items for the target.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Custom loggers can get access to this event and use it as they see fit. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Though not the exact code in the logger, the algorithm to use the target output is as follows&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;In the event handler which is registered to receive the targetFinishedEventArgs in the custom logger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;targetOutputs = targetFinishedEvent.TargetOutputs;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt; (ITaskItem item &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; targetOutputs)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #2b91af; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Console&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;.Out.WriteLine(Item.ItemSpec);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;One thing to note about this feature is when batching targets only the last target finished event for a given target will have the target outputs.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For example if you have a target which that batches three times then you will get two target finished events where the targetOutputs is null and the last one will have the set out output items for ALL batches. The reason we only have the outputs on the last batch is because of the way the target outputs are gathered by the MSBuild engine. They are only gathered after all of the batches are completed. For this reason during the batch we do not have access to the final target outputs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9988238" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category></item><item><title>Tuning C++ build parallelism in VS2010</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/03/08/tuning-c-build-parallelism-in-vs2010.aspx</link><pubDate>Mon, 08 Mar 2010 05:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9998008</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9998008</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/03/08/tuning-c-build-parallelism-in-vs2010.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;A great way to get fast builds on a multiprocessor computer is to take advantage of as much parallelism in your build as possible. If you have C++ projects, there’s two different kinds of parallelism you can configure.&lt;/P&gt;
&lt;H3&gt;What are the dials I can set?&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Project-level parallel build, which is controlled by MSBuild, is set at the solution level in Visual Studio. (Visual Studio actually stores the value per-user per-computer, which may not be always what you want – you may want to have different values for different solutions, and the UI doesn’t allow you to do that.). By default Visual Studio picks the number of processors on your machine. Do some experiments with slightly higher and lower numbers to see what gives the best speed for your particular code. Some people like to dial it down a little so that they can do other work while a build goes on.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_14.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_6.png" width=706 height=411 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_6.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;This dial is just the same as VS2008, although under the covers MSBuild is taking over some of the work from Visual Studio now.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you’re building C++ or C++/CLI, there’s another place you can get build parallelism. The CL compiler supports the /MP switch, which tells it to build subsets of its inputs concurrently with separate instances of itself. The default number of buckets, again, is the number of CPU’s, but you can also specify a number, like /MP5. Again, this was available before, so I’m going to just remind you where the value is and what it looks like in the MSBuild format project file.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Go to your project’s property pages, and to the C/C++, General page. For now I suggest that you select All Configurations and All Platforms. You can be more selective later if you want.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_2.png" width=653 height=464 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_2.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;As usual you can see what’s in the project file by unloading it, right clicking on the node in the Solution Explorer, and choosing Edit:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_4.png" width=440 height=237 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_4.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here’s what it looks like in the project file. Yes, it’s inside a configuration and platform specific block, but it put the same value in all of them.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_1.png" width=814 height=143 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_1.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Notice that it’s in an “ItemDefinitionGroup”. That MSBuild tag simply indicates it defines a&amp;nbsp; “template” for items of a particular type. In this case, all items of type “ClCompile” will automatically have metadata MultiProcessorCompilation with value true unless they explicitly choose a different value.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;By the way, MSBuild Items, in case you’re wondering, are just files, usually. Their subelements, if any, are the metadata. Here’s what some look like. Notice they’re in an “ItemGroup”:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_12.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_5.png" width=400 height=125 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_5.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Because this is metadata, at an extreme, I could actually set this down to a per-file basis. In that case, MSBuild would bucket together all the inputs that have a common value. You would need to disable /MP for particular files that use #import, for example, because that's not supported with /MP. (Other features not supported with /MP are /Gm, which is incremental compilation, and a few other switches documented&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://msdn.microsoft.com/en-us/library/bb385193.aspx" target=_blank&gt;here&lt;/A&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Note it’s under the “ItemGroup” because these are actual items:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_20.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_9.png" width=579 height=97 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_9.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Back to multiprocessor CL. If you want to tell CL explicitly how many parallel compiles to do, Visual Studio lets you do this – as for /MP, it's exposed as a global setting:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_43.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_43.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_7.png" width=589 height=348 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_7.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Under the covers, VS passes this on by setting a property (a global property – it's not persisted) named CL_MPCount. That means it won't have any effect when building outside of VS.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you want to choose a value at a finer grained level you can’t use the UI as it’s not exposed in the property pages or the command line preview. You have to go into the project file editor and type it. It’s a different piece of metadata on the CLCompile items, named “ProcessorNumber”. It can have a number from 1 to as high as you like and adds the numeric value to /MP if you want it. If you don't have &amp;lt;MultiProcessorCompilation&amp;gt; it will be ignored.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_18.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_8.png" width=626 height=84 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_8.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The squiggle here is a minor bug – ignore it.&lt;/P&gt;
&lt;H3&gt;What about building on the command line?&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The /MP settings come from the project files, so they work exactly the same on the command line. That’s part of the whole point of MSBuild, right, the same build on the command line as in Visual Studio? But the global parallelism setting that you set in Tools, Options does not affect the command line. You must pass it yourself to the msbuild.exe command with the /m switch. Again, the value is optional and if you don’t supply a value it uses the number of CPU’s. However, unlike Visual Studio, out of the box, without /m supplied, it uses 1 CPU. That might change in future.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_22.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_10.png" width=338 height=47 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_10.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;To choose the number on any /MP value, you can set an environment variable, or pass a property, named CL_MPCount, just like Visual Studio does.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Setting /MP on every project is tiresome, what are my options?&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Probably you’ll want to use /MP on more than one of your projects, and you don’t want to edit each individually. The Visual Studio solution to this kind of problem is property sheets. They don’t have any special connection to multiprocessor build, but it’s an opportunity for me to give a quick refresher using this as an example. First open the “Property Manager” from the view menu. Its exact location will vary depending on the settings you’re using, here’s where it is if you have C++ settings;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_26.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_12.png" width=252 height=430 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_12.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Right click on a project and choose “Add New Property Sheet”:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_28.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_13.png" width=358 height=191 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_13.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;I have mine the name “MultiprocCpp.props”. You’ll see it gets added to all configurations of this project. Right click on it, and you’ll see the same property pages that the project has, but this time you’re editing the property sheet. Again, set “Multi-processor Compilation” to “Yes”. Close the property pages, select the property sheet in the Property Manager, and hit Save.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Now I can open up that new MultiprocCpp.props file in the editor, and I see this:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_30.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_30.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_14.png" width=595 height=215 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_14.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(Again, ignore the squiggle.)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Looking in the project file, you can see the property sheet pulled in to each configuration, using an “Import” tag. Think of that just like a #include in C++:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_34.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_34.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_16.png" width=624 height=71 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_16.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;So now we have the definition we put in the project file before, but in a reusable form. Given that, I can put it into all the projects I want in one shot, by multi-selecting in the Property Manager and choosing Add Existing Property Sheet:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_32.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_32.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_15.png" width=484 height=224 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_15.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Now all your projects compile with /MP !&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In some circumstances, you might want to go beyond what you can easily do in the Property Manager. For example you might want to bulk-remove a property sheet, or put a property sheet in each project once outside of all the configurations. Fortunately MSBuild 4.0 has a powerful and complete object model over its files that you can use to do this kind of work in a few lines of code. More on that in a future blog post, but for now, if you want to take a look, point the Object Browser at Microsoft.Build.dll.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Before I leave property sheets, it’s worth mentioning that you can do this kind of common-importing in your own ways, if you don’t mind losing some of the UI support. For example, in the build of VS itself, we pull in a common set of properties at the top of every project, like this example from the project that builds msenv.dll (which contains much of the VS shell)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_36.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_36.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_17.png" width=583 height=88 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_17.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Within&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;that&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;we define all kinds of global settings, and import yet others. I’ll talk about this kind of structure in a future blog post about the organization of large build trees.&lt;/P&gt;
&lt;H3&gt;Too much of a good thing&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Usually the problem is getting enough parallelism to exploit all your machine’s cores. But the reverse problem is possible, and although it’s a nice problem to have, it needs fixing because it will cause your machine to thrash. Here’s what task manager might look like when this is happening:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_40.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_40.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_19.png" width=338 height=464 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_19.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In this case on a box with 8 CPU’s I enabled /MP on all my projects in the solution, and then built it with msbuild.exe /m (I didn’t need to use the command line to have this problem, the same could happen in Visual Studio). If dependencies don’t prevent it, MSBuild will kick off 8 projects at once, and in each of those CL will run 8 instances of itself at once, so we could have up to 64 copies of CL all fighting over my cores and my disk. Not a recipe for performance.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;You can expect that one day the system will auto-tune itself here, but for now if you have this problem you would do some manual adjustment. Here’s some ideas:&lt;/P&gt;
&lt;H5&gt;Dial down the values globally&lt;/H5&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Reduce /m:4 to /m:3, for example, or use a property sheet to change /MP to /MP2, say. Easy, but a blunt instrument: if there are points elsewhere in your build where there is a lot of project parallelism but not much CL parallelism, or vice versa, you probably just slowed them down.&lt;/P&gt;
&lt;H5&gt;Tune /MP for each project and configuration&lt;/H5&gt;
&lt;P style="MARGIN: 1em 0px"&gt;A project that compiles at a relatively parallelized point in the build is not such a good candidate for /MP, for example. You might adjust by configuration as well. Retail configuration can be much slower to build because the compiler’s optimizing more: that might make it interesting to enable /MP for Retail and not Debug.&lt;/P&gt;
&lt;H5&gt;Get super custom&lt;/H5&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In your team, you might have a range of hardware. Perhaps your developers have 2-CPU machines, but your nightly build is on an 8-CPU beast. Yet the both need to build the same set of sources, and you don't want any box to be either slow or thrashing. In this case, you could use environment variables, and Conditions on the MSBuild tags. Almost all MSBuild tags can have Conditions.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here’s an example below. When a property “MultiprocCLCount” (which I just invented) has a value, and it’s greater than 0, /MP is enabled with that value.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_42.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_42.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_20.png" width=859 height=93 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/c055f4ef9d7a_ECBB/image_thumb_20.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;MSBuild pulls in all environment variables as its initial properties when it starts up. So on my fast machine, I set an environment variable&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MultiprocCLCount=8&lt;/STRONG&gt;, and on my developer boxes, I set&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MultiprocCLCount=2.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The build machine’s script could also parameterize the /m switch going to MSBuild.exe, like&lt;STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/m:%MultiprocMSBuildCount%&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;To other properties that might be useful in exotic conditions:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;$(Number_Of_Processors)&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;is the number of logical cores on the box – this just comes from the environment variable.&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;$(MSBuildNodeCount)&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;is the value that was passed to /m on msbuild.exe, or within VS, the value from Tools&amp;gt;Options for project parallelism.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;That’s it. I hope while walking you through /m and /MP I’ve also given you an overview of some MSBuild features and how much flexibility they give you to configure your build process.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Optimizing your build speed is a huge topic so look for more blogging on this subject from me.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;Dan Moseley&lt;/STRONG&gt;&lt;BR&gt;Developer Lead - MSBuild&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9998008" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Performance/">Performance</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/VC_2B002B00_/">VC++</category></item><item><title>MSBuild 4 Detailed Build Summary</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/03/05/msbuild-4-detailed-build-summary.aspx</link><pubDate>Fri, 05 Mar 2010 15:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9998005</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9998005</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/03/05/msbuild-4-detailed-build-summary.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;H3&gt;Introduction&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;When we were developing the current version of MSBuild, we spent a lot of time analyzing builds to determine where our performance issues lay. The standard logging, even on diagnostic verbosity and with the performance summary enabled (/clp:PerformanceSummary=true on the MSBuild command line) doesn’t give us the kind of information we desired. What we were looking for was a quick way to visualize which projects depended on which other projects, how much time they were taking, and how MSBuild was allocating the work to its worker nodes. Enter the Detailed Build Summary.&lt;/P&gt;
&lt;H4&gt;A Word About Nodes&lt;/H4&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Before looking at these graphs, it is important to understand how MSBuild performs its work. When a project is being built, all of its tasks are executed on a worker node. There is always at least one node, present in the MSBuild executable launched from the command line or inside the Visual Studio IDE. This is referred to as the in-proc node. There may be additional nodes created out-of-proc, and are called the out-of-proc or multi-proc nodes. In the case where MSBuild has more projects to build than currently existing nodes, it will create new worker nodes up to the limit specified by the /m switch.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Each node may have any number of projects assigned to it, but only one project at a time will be executing tasks (though there an exception with the Yield mechanism which I won’t get in to here.)&lt;/P&gt;
&lt;H4&gt;Gimme Some Numbers!&lt;/H4&gt;
&lt;P style="MARGIN: 1em 0px"&gt;You can enable the Detailed Build Summary for any build by passing the /ds or /detailedsummary switch to MSBuild. This will cause MSBuild to compile and log this information at the end of the log file. For this blog I whipped up a little build tree, built using four MSBuild worker nodes (/m:4), and turned on the log&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=0 width=1045 bgColor=#d3d3d3&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=1043&gt;
&lt;P style="MARGIN: 1em 0px" dir=ltr&gt;&lt;FONT size=2 face=Consolas&gt;F:\Bugs\MultiProc&amp;gt;msbuild /tv:4.0 cir1.proj /m:4 /ds /t:ParallelBuild &amp;gt; foo.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" dir=ltr&gt;&lt;FONT size=2 face=Consolas&gt;The end of foo.txt after the build…&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" dir=ltr&gt;&lt;FONT size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Detailed Build Summary&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ======================&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ============================== Build Hierarchy (IDs represent configurations) =====================================================&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Exclusive Time&amp;nbsp;&amp;nbsp; Total Time&amp;nbsp;&amp;nbsp; Path (Targets)&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------------------------------------------------------------------------------------------------------------------------------&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.036s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.295s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir1.proj (ParallelBuild)&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.047s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.047s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir2.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.209s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.209s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir4.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.210s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.210s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir3.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.212s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.217s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir5.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | | 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.005s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.005s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir8.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | . 11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.003s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.003s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir9.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir6.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.003s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.015s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir7.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | . 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.004s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.012s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir5.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | | | 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.007s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.007s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir8.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | | . 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F:\Bugs\MultiProc\cir9.proj ()&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ============================== Node Utilization (IDs represent configurations) ====================================================&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Duration&amp;nbsp;&amp;nbsp; Cumulative&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------------------------------------------------------------------------------------------------------------------------------&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540333349050:&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.035s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.035s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540333699050:&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.041s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.076s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334109050:&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.006s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.082s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334169050:&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.083s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334179050:&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.002s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.085s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334199050:&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.002s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.087s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334219050:&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.007s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.094s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334289050:&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.095s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334299050:&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.002s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.097s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334319050:&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.001s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.098s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540334329050:&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.188s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.286s ###&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540336209050:&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.003s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.289s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540336239050:&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.002s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.291s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540336259050:&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.003s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.294s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 634032540336289050:&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.002s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.296s&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------------------------------------------------------------------------------------------------------------------------------&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Utilization:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.8&amp;nbsp;&amp;nbsp;&amp;nbsp; 96.8&amp;nbsp;&amp;nbsp;&amp;nbsp; 97.7&amp;nbsp;&amp;nbsp;&amp;nbsp; 96.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Average Utilization: 81.3&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" dir=ltr&gt;&lt;FONT size=2 face=Consolas&gt;Build succeeded.&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 Warning(s)&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 Error(s)&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" dir=ltr&gt;&lt;FONT size=2 face=Consolas&gt;Time Elapsed 00:00:00.32&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The data is split up into two sections – the Build Hierarchy and the Node Utilization. I’ll explain them in order.&lt;/P&gt;
&lt;H5&gt;Build Hierarchy&lt;/H5&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The hierarchy section shows all of the projects that were built. Each of the columns contains the following information:&lt;/P&gt;
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;ID – The&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;request&lt;/I&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;ID which was built. (This is a bug in the text output, it’s not a configuration.) A request is any request to build a target on a project. This can be from the command-line or through am MSBuild task. Note that if the same project file is invoked with the same target using the same global properties and tools version multiple times during the build, it may show up multiple times in the graph in different places. This is ok. However, sometimes it will be invoked multiple times and NOT show up. This is due to the way MSBuild works internally in that it can shortcut some work and we don’t capture that in this graph.&lt;/LI&gt;
&lt;LI&gt;Exclusive Time – The amount of time MSBuild spent actually executing the tasks and targets in that request. This does NOT include the time spent waiting for an MSBuild task to build the projects it depends on.&lt;/LI&gt;
&lt;LI&gt;Total Time – This is the time spent executing tasks and targets plus the time spent waiting for other dependency requests to build.&lt;/LI&gt;
&lt;LI&gt;Path – Displays the path to the project file which was invoked for that request.&lt;/LI&gt;
&lt;LI&gt;(Targets) – In parentheses after the path is the list of targets which were specified. If this is empty, the default targets were executed instead. This list will never show the default or initial targets, only those explicitly specified on the command-line or in the Targets parameter of the MSBuild task.&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 1em 0px"&gt;To the left and below each ID number is the tree layout. Each pipe ‘|’ symbol means that the request to the right of it is a dependency (that is, the request above depends on the request to the right directly.) The more pipes, the deeper the dependency tree. A period ‘.’ symbol means that the ID to the left is the last dependency request for the parent (which is the ID above the symbol in that column) which was actually built. So in the above, 0 is the root request and it depends on 1, 3, 2, 4, 5 and 6 directly. Request 6 depends on 7, which depends on 8 and 9. 6 can be said to indirectly depend on 8 and 9 through request 7.&lt;/P&gt;
&lt;H5&gt;Node Utilization&lt;/H5&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The utilization section shows how MSBuild has allocated requests to build using the nodes available. The columns have the following meanings:&lt;/P&gt;
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;Timestamp – This is the wall-clock time for the current event. We generate a new event any time something has changed about how work is distributed. The time between events may vary significantly because of this.&lt;/LI&gt;
&lt;LI&gt;(numbered columns) – This is the ‘current work’ display for each node. The following symbols may appear: 
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;(number) – This represents a request and corresponds to the requests in the Build Hierarchy. It specifically means that the specified request has either started or resumed on the node.&lt;/LI&gt;
&lt;LI&gt;x – The node is idle and doing no work.&lt;/LI&gt;
&lt;LI&gt;| - The node is still working on the current request. The request number is the one at the top of the | symbols.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;Duration – This is the amount of time the system spent in this state.&lt;/LI&gt;
&lt;LI&gt;Cumulative – This is the total amount of time which has elapsed from the beginning of the build until this state ends.&lt;/LI&gt;
&lt;LI&gt;(hash ‘#’ marks) – These display the duration in units of 0.05 seconds. Useful to quickly find events which take a long time to process (though less useful than a bar graph scaled relative to the entire build time.)&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Using this information, we can see that request 0 is first assigned to node 1. It then immediately cedes control to request 1 (one of its dependencies). If we look at request 0, we can see it depends on many other requests. But they are not scheduled at this event because MSBuild creates nodes dynamically, so the other nodes weren’t available yet. The next event we see requests 2, 3 and 4 are all scheduled because those nodes have become available. During this period request 1 continues to execute on node 1. This proceeds for a while until we get down toward the bottom. We can see eventually we run out of work to schedule on node 1, leaving 2, 3 and 4 to keep executing. Request 4 depends on requests 10 and 11, and we can see the point at which node 2 suspends executing request 4 – this is where request 4 must wait on its dependencies. Once those have finished (building on nodes 3 and 4 in this case), request 4 resumes on node 2. By that point it is the last request which request 0 was waiting on. Once it is finished, request 0 resumes on node 1, and then finishes.&lt;/P&gt;
&lt;H4&gt;Analyzing the Data&lt;/H4&gt;
&lt;P style="MARGIN: 1em 0px"&gt;At the end, we display some utilization numbers, which tells how well we loaded the worker nodes. In a 100% perfectly parallelizable build, we would like to see 100% for all of those utilizations. In practice this rarely occurs because builds tend to have places where they are more serialized (if you have a common library which takes a long time to build, you will see this.) If you look at your graph and you see one node doing work while no others are and the total duration of that period is long, then that is an indication you have serialization in your build and it may be worth looking at whether that request really should be that long – can it be split up into smaller chunks and have other requests refer to it piecemeal? Can the project itself be made to build faster using better tools? Is the request doing something unexpected?&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Another thing you can experiment with when trying to tune your builds is changing the multi-proc node count limit. For instance, sometimes setting the /m number to one more or one less than the number of actual cores you have will enhance scheduling. If you are performing C++ builds, you may also play with the /MP setting on the compiler which enables it to parallelize the processing of C++ files directly.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;MSBuild currently uses some heuristics to determine when projects should be scheduled to build. This is especially important when there are more outstanding build requests to schedule than there are nodes to work on them. So even if you do manage to eliminate all serialization, the theoretical minimal build time might not be achieved because we lack the information to make the right decisions. This is an area we are currently working on, and we hope to bring you even more improved build times in the future.&lt;/P&gt;
&lt;H4&gt;Conclusion&lt;/H4&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here in MSBuild we are very motivated to provide improved build analysis tools and intrinsically smarter build systems. The Detailed Build Summary diagnostic output in MSBuild 4 can provide some useful information about how MSBuild sees and builds your projects. Using it you can determine the actual project dependencies and relative build times of all of your projects. This information can then be used to better organize your projects for the purposes of more efficient builds. This functionality only scratches the surface of what is necessary for analyzing more complex builds, but rest assured we are hard at work bringing you those tools.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you find this information useful, and especially if you decide to actually parse the output of this functionality, let us know. We certainly intend to improve the mechanism, but if it ends up being useful as-is we will want to try to keep it stable so that future releases don’t break your code.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;Cliff Hudson&lt;/STRONG&gt;&lt;BR&gt;Visual Studio Platform&lt;BR&gt;MSBuild Developer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9998005" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/cliff+hudson/">cliff hudson</category></item><item><title>Getting Started with MSBuild</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/02/25/getting-started-with-msbuild.aspx</link><pubDate>Thu, 25 Feb 2010 11:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9998004</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9998004</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/02/25/getting-started-with-msbuild.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;I have had several customers asking me about MSBuild and how to get started learning the language and using it. A little over a year and a half ago, I joined the MSBuild team. When I got here, I did not even know what MSBuild was, and I have been a Visual Studio user for many years. This article is to help you understand what MSBuild is, how it relates to Visual Studio, and why&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;every&lt;/U&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;developer should know how to use it.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;MSBuild ships as part of the .NET Framework, starting with v2.0 in Visual Studio 2005 and updated in v3.5 with Visual Studio 2008. It is a declarative language (XML) that allows you to quickly and easily write complex build systems. It is highly extensible, making customizations to an existing build process a simple task.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;It has been the basis for the managed project systems that ship as part of Visual Studio. Over the years, the number of project types that MSBuild supports has grown. In Visual Studio 2010 (MSBuild v4.0) we add support for Visual C++. In addition, MSBuild v4.0 introduces several new language features, a new object model, and many performance improvements; including scheduler enhancements and the new FileTracker technology that provides reliable and fast incremental builds.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;To the developer, there is tremendous benefit to understanding MSBuild. This is the same benefit Visual Studio utilizes to build the various project types we support. The developer can hook into this system to perform repetitive tasks, add custom tooling, and to help guarantee accuracy of the build. These are tasks that most developers face every day in trying to get their work done. And these benefits can also be leveraged on a build server. For example, Team Foundation Build also uses MSBuild to build its projects.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Learning MSBuild is like learning any new language. There are some basics that you need to understand to get started. For example, the language is declarative, as opposed to imperative languages such as C# and VB. Hence, the traditional flow of execution may seem strange at first.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image002_thumb.jpg" width=244 height=243 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;One great exercise to start is to take a look at the contents of a new C# or VB project in Visual Studio. To do so, right-click on a project node in “Solution Explorer” and click "Unload Project" in the context menu that appears. The project will unload and become grayed out.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image003_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image003_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image003 border=0 alt=clip_image003 src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image003_thumb.png" width=244 height=79 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image003_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Next, right-click on the same project node and select "Edit {ProjectName}". The project file will be loaded up in the Visual Studio XML editor.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image004_2.png" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image004_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image004_thumb.png" width=244 height=174 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image004_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Take a look at the XML: You will notice that there are PropertyGroups that contain child nodes (known in MSBuild as “properties”) which define the build settings for various configurations. These are the global switches you might provide to tools to determine whether you want optimized or debug code, or whether or not to generate symbols.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;ToolsVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;4.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DefaultTargets&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Build&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;'$(Configuration)' == ''&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;Debug&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Platform&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;'$(Platform)' == ''&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;x86&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Platform&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ProductVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;8.0.30703&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ProductVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;SchemaVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;2.0&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;SchemaVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ProjectGuid&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;{8076DCA7-8C27-44D9-9A0F-7CD5C091C6E1}&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ProjectGuid&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;OutputType&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;Exe&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;OutputType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;AppDesignerFolder&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;Properties&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;AppDesignerFolder&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;RootNamespace&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;Sample&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RootNamespace&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;AssemblyName&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;Sample&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;AssemblyName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;TargetFrameworkVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;v4.0&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;TargetFrameworkVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;TargetFrameworkProfile&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;Client&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;TargetFrameworkProfile&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;FileAlignment&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;512&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;FileAlignment&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;'$(Configuration)|$(Platform)' == 'Debug|x86'&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PlatformTarget&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;x86&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;PlatformTarget&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;DebugSymbols&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;true&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;DebugSymbols&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;DebugType&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;full&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;DebugType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Optimize&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;false&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Optimize&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;OutputPath&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;bin\Debug\&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;OutputPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;DefineConstants&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;DEBUG;TRACE&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;DefineConstants&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ErrorReport&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;prompt&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ErrorReport&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;WarningLevel&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;4&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;WarningLevel&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Closer to the bottom of the file, you will see ItemGroups gathering sets of MSBuild “items”, used to represent concepts such as References (Imports in VB), Compile items (these are your source code files you have added to the project), resources, etc. Items are used to keep track of lists, while properties are key-value pairs.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI', sans-serif; COLOR: rgb(51,51,51)"&gt;&lt;FONT size=3&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;…&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ItemGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;System&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Core&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Xml.Linq&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Data.DataSetExtensions&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;Microsoft.CSharp&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Data&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Reference&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Xml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ItemGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ItemGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Compile&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;Program.cs&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Compile&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Include&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;Properties\AssemblyInfo.cs&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;ItemGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Import&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;$(MSBuildToolsPath)\Microsoft.CSharp.targets&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;You are also bound to see an Import element or two. These allow you to pull in MSBuild code located in other files (like a C/C++ #include). By placing your MSBuild code outside the project in imports you keep the individual project files small. The things specific to that project are located in the project, and settings of broader interest are located in the reusable components (targets), which are generally located where lots of projects can easily point to them. Typically, imports have the ".props" or ".targets" extension. MSBuild does not really care what the extension is, and considers these to all be just regular MSBuild project files. By convention, the extensions imply that a ".props" file contains property definitions (and/or items and definitions), and a ".targets" file contains target definitions.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;PrintMyMessage&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;MyMessage&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;MSBuild Rocks!&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;MyMessage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Message&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;$(MyMessage)&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;A target is something like a sub-routine or procedure in a traditional language. They are built with XML, but act more like imperative code. The example target above, named PrintMyMessage, sets the property MyMessage to “MSBuild Rocks!”, and then prints it to the output. The &amp;lt;Message /&amp;gt; element above is what calls the Message task to actually print the property. MSBuild ships with a wealth of targets for building the projects you use in Visual Studio.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Tasks are like MSBuild library functions. We deliver a large set with MSBuild, including tasks to make directories, copy/delete files, invoke the compilers, etc. In fact, almost all of the command line build tools in the .NET Framework that are needed to build most applications are wrapped by a corresponding MSBuild task. If none of the pre-existing tasks suit, you can look at an existing library like the comprehensive&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://www.codeplex.com/MSBuildExtensionPack" target=_blank&gt;MSBuild Extensions Pack&lt;/A&gt;. Or, you can write your own tasks. Tasks can be built from any of the managed languages, or with v4.0, you can write inline tasks in VB or C#. (More on that in a later post!)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;ToolsVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;4.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DefaultTargets&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Build&lt;/SPAN&gt;"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: rgb(163,21,21); FONT-SIZE: 9.5pt"&gt;Project&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;To hook all of this together, you need a place to start. In MSBuild, there are several ways to get started. In the project file you have open, look at the top opening &amp;lt;Project&amp;gt; element. You will see a DefaultTargets attribute. This defines the targets that will be executed if you run MSBuild on the file. In a standard project, this is set to "Build", which just happens to be the name we gave the all-encompassing build for that project type. If you want to run something other than the default target(s), you can also tell MSBuild explicitly which target you want to execute in the project. For example, the Rebuild target runs the Clean target followed by the Build target to rebuild your project. To run the Rebuild target instead, in a standard Visual Studio command prompt you can type:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: rgb(51,51,51)"&gt;&lt;FONT size=3&gt;msbuild Sample.csproj /t:Rebuild&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;This will run MSBuild on the Sample.csproj project, and initiate the "Rebuild" target. To specify multiple targets, list them in a semicolon-delimited list, e.g.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: rgb(51,51,51)"&gt;&lt;FONT size=3&gt;msbuild Sample.csproj /t:Clean;Build&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Once the process has been kicked off by specifying a starting target(s), MSBuild will then build the target(s) and any others that have been chained to it by the various means MSBuild has to specify dependencies. If a target depends on another target(s) (as specified by the DependsOnTargets attribute on the target element), then MSBuild will run the other target(s) prior to running the target specified. In MSBuild v4.0, you can also use the BeforeTargets and AfterTargets attributes to specify the targets this target needs to run before or after respectively.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Unlike the flexibility afforded to you by calling MSBuild on the command line, Visual Studio only explicitly supports the use of four targets: Build, Clean, Rebuild, and Publish.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image006_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image006 border=0 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image006_thumb.jpg" width=244 height=135 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/clip_image006_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;When you are done exploring your project, right-click on the project name in the Solution Explorer and choose "Reload Project" from the context menu. This will load the project back up in Visual Studio.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Now, when you click build, or F5 to debug (which first requests a build under the covers), all this is set in motion. Visual Studio kicks off an execution of the desired MSBuild target, and the items in your project are built according to the definitions provided by the project and any other targets files or property sheets.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;And this is where you come in: you can leverage this same system to do all sorts of cool things when you build. You can use MSBuild to deploy files to a server, automatically increment your build number, or even send yourself a text message upon completion of a nightly build. And it is so simple to do and to use.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads" mce_href="http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/chuckeng_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/chuckeng_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 0px" title=chuckeng border=0 alt=chuckeng align=left src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/chuckeng_thumb.jpg" width=49 height=64 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/TheVisualStudioBlog_8B4E/chuckeng_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Chuck England&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; Visual Studio Platform&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp; Program Manager – MSBuild&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Want to learn more? Check our online documentation…&lt;/P&gt;
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;Overview:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://msdn.microsoft.com/en-us/library/ms171452.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms171452.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms171452.aspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Concepts:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://msdn.microsoft.com/en-us/library/ms171451.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms171451.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms171451.aspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Reference:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx" mce_href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx"&gt;http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Or listen to the CodeCast I recently did with Ken Levy:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://www.code-magazine.com/codecast/" mce_href="http://www.code-magazine.com/codecast/"&gt;http://www.code-magazine.com/codecast/&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;And join us at the MSBuild forums:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads" mce_href="http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads"&gt;http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here’s a pack of ready-made MSBuild tasks that go beyond the ones you get in the box:&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" title=http://www.codeplex.com/MSBuildExtensionPack href="http://www.codeplex.com/MSBuildExtensionPack"&gt;http://www.codeplex.com/MSBuildExtensionPack&lt;/A&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9998004" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Chuck+England/">Chuck England</category></item><item><title>MSBuild Task Factories: guest starring Windows Powershell</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/02/20/msbuild-task-factories-guest-starring-windows-powershell.aspx</link><pubDate>Sat, 20 Feb 2010 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9998001</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9998001</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/02/20/msbuild-task-factories-guest-starring-windows-powershell.aspx#comments</comments><description>&lt;P style="LINE-HEIGHT: 13.5pt; MARGIN: 12pt 0cm" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #333333; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;One of the cool new features of MSBuild 4.0 is the extensible task factory.&amp;nbsp; Task factories allow you to include scripts directly in your project file (or an imported .targets file) and have those scripts parsed and executed by your favorite interpreter.&amp;nbsp; Those scripts might even be C# or VB.NET code snippets that get compiled into assemblies and executed on-the-fly during the build.&amp;nbsp; This significantly lowers the bar to doing specialized work in your build for which there is no built-in MSBuild Task, since you don’t have to check into your source control repository a precompiled .dll with your custom task any more.&amp;nbsp; You may still want to do that for performance reasons or for the design-time experience of writing MSBuild tasks in C# and get all the C# Intellisense that you only get in a C# project, but for short tasks, “inline tasks” that are built and executed on-the-fly may be just the ticket you need.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 13.5pt; MARGIN: 12pt 0cm" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #333333; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;MSBuild 4.0 ships with C#, VB.NET and XAML task factories built-in, so you can define a custom task in C# or VB.NET inline today.&amp;nbsp; But writing your own task factory will allow you to write inline tasks in Perl, Python, or in this case… Windows Powershell script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 13.5pt; MARGIN: 12pt 0cm" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #333333; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Consider, for the sake of example, that there is no MSBuild task that sends an email at the conclusion of a build.&amp;nbsp; Fixing that with a custom MSBuild task, compiled into a .dll, seems a bit heavyweight.&amp;nbsp; But defining that task right there in your project file is easy.&amp;nbsp; Here’s how you might write a Powershell inline task using the Windows Powershell task factory.&amp;nbsp; Notice below how we first define the task in terms of the code it executes and its input and output parameters.&amp;nbsp; Then in a standard MSBuild Target we invoke that inline task as we would any other MSBuild task.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;ToolsVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;4.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DefaultTargets&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Build&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;UsingTask&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;TaskFactory&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;WindowsPowershellTaskFactory&lt;/SPAN&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;TaskName&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;SendMail&lt;/SPAN&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;AssemblyFile&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;$(TaskFactoryPath)WindowsPowershellTaskFactory.dll&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;ParameterGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;From&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Required&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ParameterType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.String&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Recipients&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Required&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ParameterType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.String&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Subject&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Required&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ParameterType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.String&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Body&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Required&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ParameterType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.String&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;RecipientCount&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Output&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;ParameterGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Task&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;![CDATA[&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$smtp = New-Object System.Net.Mail.SmtpClient&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$smtp.Host = "mail.microsoft.com"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$smtp.Credentials = [System.Net.CredentialCache]::DefaultCredentials&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$smtp.Send($From, $Recipients, $Subject, $Body)&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$RecipientCount = $Recipients.Split(';').Length&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", "Send mail to {0} recipients.", $recipientCount)&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: gray; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;]]&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Task&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;UsingTask&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;BuildLabEmail&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;buildlab@yourcompany.com&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;BuildLabEmail&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;BuildRecipients&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;interested@party.com;boss@guy.com&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;BuildRecipients&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;Build&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;SendMail&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;From&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;$(BuildLabEmail)&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Recipients&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;$(BuildRecipients)&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Subject&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Build status&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Body&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Build completed&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Output&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;TaskParameter&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;RecipientCount&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;PropertyName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;RecipientCount&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Add&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 13.5pt; MARGIN: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #333333; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;This project would build, and send a built completion email to recipients determined by the project itself.&amp;nbsp; The only assembly you need is the Windows Powershell task factory itself, which can be reused for all your projects that include inline Windows Powershell scripts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 13.5pt; MARGIN: 12pt 0cm" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #333333; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Note that the inline task above will not run without the task factory .dll that it points to, which in this case is&amp;nbsp;&lt;I&gt;not&lt;/I&gt;&amp;nbsp;shipped with VS2010.&amp;nbsp; The&amp;nbsp;&lt;A href="http://code.msdn.microsoft.com/PowershellFactory"&gt;&lt;SPAN style="COLOR: #366df4"&gt;Windows Powershell task factory is available&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;as a sample task factory on the MSDN Code Gallery.&amp;nbsp; Feel free to check it out, and give feedback.&amp;nbsp; It’s just a sample, so all the “no guarantees for fitness to any particular task” limitations apply.&amp;nbsp; But you get the source code, so you can tweak it or file bugs if you wish.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 13.5pt; MARGIN: 12pt 0cm" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #333333; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;Andrew Arnott&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9998001" width="1" height="1"&gt;</description></item><item><title>Build Extensibility with .NET Framework 4</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/02/18/build-extensibility-with-net-framework-4.aspx</link><pubDate>Thu, 18 Feb 2010 16:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9997999</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9997999</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/02/18/build-extensibility-with-net-framework-4.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;H2&gt;Introduction&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;With the release of .NET Framework 4 and Visual Studio 2010 comes MSBuild 4.0. Among the many great features in this version are new mechanisms to allow you (or your build lab) to extend the default build targets files with your own customizations. While some of this functionality did exist in previous versions, it has been made even easier and more powerful. This article will help you understand the new extensibility mechanisms and how they can be most effectively used. By way of example, we will show how to add entry points to the build system where you could perform source control operations and custom publishing of your outputs.&lt;/P&gt;
&lt;H2&gt;The Old Way&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;With versions of the .NET Framework prior to 4.0, the provided targets files included a variety of special targets which could be overridden to allow the running of additional targets. Let's look at the 'Build' target, located in the Microsoft.Common.targets file in your .NET Framework directory. That target declares several other targets as dependencies (i.e. targets which are required to run before it may execute.)&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;PropertyGroup&amp;gt;
        &amp;lt;BuildDependsOn&amp;gt;
            BeforeBuild;
            CoreBuild;
            AfterBuild
        &amp;lt;/BuildDependsOn&amp;gt;
    &amp;lt;/PropertyGroup&amp;gt;
    &amp;lt;Target
        Name="Build"
        Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
        DependsOnTargets="$(BuildDependsOn)"
        Outputs="$(TargetPath)"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The 'Build' target declares its&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;as coming from the $(BuildDependsOn) property group, which includes 'BeforeBuild', 'CoreBuild' and 'AfterBuild'. Thus, when the 'Build' target is invoked, MSBuild will ensure that the 'BeforeBuild', 'CoreBuild' and 'AfterBuild' targets are executed before any tasks are processed within the Build target. MSBuild will also guarantee that they the run in the order specified. If any of them had already run previously (and not skipped), those entries will be skipped. Thus, if 'CoreBuild' had already been executed by the time 'Build' was invoked, then 'BeforeBuild' and 'AfterBuild' would be invoked, in order, prior to executing the first task in 'Build'.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;By default, the 'BeforeBuild' and 'AfterBuild' targets are empty. They serve as placeholders for user-defined targets in your own project files. The position of those targets is built into the default Microsoft.Common.targets (and other targets files with similar designs.) In this case, you can override 'BeforeBuild' or 'AfterBuild' in your project file, and when 'Build' is invoked, your version of 'BeforeBuild' or 'AfterBuild' will be invoked according to the rules above, providing your version of those targets is encountered after the original targets when the project file is parsed. This is based on the "last target definition wins" rule for targets in MSBuild – the last target that MSBuild parses with a given name will be the one which gets used during the build.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In our hypothetical source-control and publishing example, we might define our new targets as follows:&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR style="HEIGHT: 60px"&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;Import Project="Microsoft.Common.targets" /&amp;gt;  &amp;lt;-- the original BeforeBuild and AfterBuild are defined here
    &amp;lt;Target Name="BeforeBuild"&amp;gt;
        &amp;lt;Message Text="Performing source control operations" /&amp;gt;
        ... execute tasks to do source control ...
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="AfterBuild"&amp;gt;
        &amp;lt;Message Text="Copying outputs for publishing." /&amp;gt;
        ... execute tasks move your output files as appropriate ...
    &amp;lt;/Target&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you were to then build your project and specify a target of 'Build', you would see your source control operations occur first. Once the build was completed, you would see your new copying tasks execute.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Note there is a bit of naming confusion in looking at these targets. As you can see above, the 'Build' target doesn't really do anything other than specify&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and a condition. Its whole purpose is to give you the ability to specify targets to run before and after 'CoreBuild', which does the real work. This works fine as far as it goes, but it suffers from a few drawbacks:&lt;/P&gt;
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;The build system must have been authored with the extensibility points in place – in the example above, if 'Build' had not been authored to depend on 'BeforeBuild', there would have been no way to extend the system.&lt;/LI&gt;
&lt;LI&gt;You must implement the extensibility using a level of indirection (like the 'Build'/'CoreBuild' system above) if you intend to support an extensibility point&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;after&lt;/EM&gt;the target to be extended.&lt;/LI&gt;
&lt;LI&gt;Your own extensions cannot themselves be extended without doing the above.&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In MSBuild 4.0, all of these caveats and restrictions have been eliminated.&lt;/P&gt;
&lt;H2&gt;The New Way: BeforeTargets and AfterTargets&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;We introduce two new attributes to the Target element in MSBuild. Consider a target 'X' with these attributes:&lt;/P&gt;
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;– Specifies a list of targets before which 'X' should run.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;AfterTargets&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;–&lt;STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Specifies a list of targets after which 'X' should run.&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 1em 0px"&gt;These attributes both behave in exactly the&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;opposite&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;fashion from&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;, in that another target's execution will trigger this target to execute, rather than this target's execution triggering another target. A simple example will illustrate how this works:&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;Import Project="Microsoft.Common.targets" /&amp;gt;
    &amp;lt;Target Name="GetSourceFiles" BeforeTargets="Build"&amp;gt;
        &amp;lt;Message Text="GetSourceFiles now executing" /&amp;gt;
        ... execute your source control operations ...
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="CopyOutputsForPublishing" AfterTargets="Build"&amp;gt;
        &amp;lt;Message Text="CopyOutputsForPublishing now executing" /&amp;gt;
        ... execute your copying operations ...
    &amp;lt;/Target&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;These attributes may not have been named as well as they could have been. Consider reading them as "RunBeforeTargets" and "RunAfterTargets". If you execute the 'Build' target, the 'GetSourceFiles' target will be executed first (that is, 'GetSourceFiles'&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;runs before target&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;'Build'), and then after 'Build' is finished, the 'CopyOutputsForPublishing' target will execute ('CopyOutputsForPublishing'&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;runs after target&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;'Build'). This mechanism can be used to extend any targets, including your own extensions. The following, for example, would be valid (and behave as expected):&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;Import Project="Microsoft.Common.targets" /&amp;gt;
    &amp;lt;Target Name="GetSourceFiles" BeforeTargets="Build"&amp;gt;
        &amp;lt;Message Text="GetSourceFiles now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="CopyOutputsForPublishing" AfterTargets="Build"&amp;gt;
        &amp;lt;Message Text="CopyOutputsForPublishing now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="NotifyBuildIsStarting" BeforeTargets="GetSourceFiles"&amp;gt;
        &amp;lt;Message Text="NotifyBuildIsStarting now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Here your 'NotifyBuildIsStarting' target will execute, then 'GetSourceFiles', then 'Build', then 'CopyOutputsForPublishing'. Other combinations you might imagine will also work equally well. However, we found that there was a potential for significant confusion about how these three mechanisms interact with each other, so the next section will focus on that.&lt;/P&gt;
&lt;H2&gt;Details and Best Practices&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;One of the most frequently confused concepts we found when people were first given a chance to use&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;was the issue of dependencies versus extensibility, and specifically how to use these mechanisms to enforce execution order.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;When writing targets files, the author is primarily concerned with dependency ordering. That is, certain targets depend on certain other targets to run first. Importantly, the target which is being run must be able to specify that it requires those other dependency targets to be executed first, and that dependency will only be executed if the original target would execute. This strict dependency chain allows entire hierarchies of work to be described and controlled from a single target, and the entire hierarchy is known and understood when it is constructed.&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;thus creates a static, design-time build hierarchy which MSBuild will turn into a run-time build order as the targets are executed.&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Extensibility, on the other hand, is concerned with inserting new behaviors into an existing hierarchy. When&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;are specified, they do not imply any dependency ordering. For instance, if 'GetSourceFiles' specifies a&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;of 'Build', this does not mean that 'GetSourceFiles' must run in order for 'Build' to run. Instead, it means that&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;at the point where 'Build' would run, execute 'GetSourceFiles' first.&lt;/EM&gt;&lt;STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;The dependency hierarchy which already existed is unaffected, so targets specified by&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;will still run if they would have before. Therefore,&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;alter run-time build ordering and do not themselves create or modify the build hierarchy.&lt;/P&gt;
&lt;H3&gt;Differences to DependsOnTargets&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The biggest difference to&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;in the behavior of&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;is how the condition expression of the original target affects the running of the extension target. If target 'Build' specifies a&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;of 'GetSourceFiles', the 'GetSourceFiles' target&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;will not&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;run if the condition of the 'Build' target evaluates to false. However, if you create a target 'GetSourceFiles' with&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;specifying 'Build', 'GetSourceFiles'&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;will&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;execute even if the condition on 'Build' evaluates as false. In this way,&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;provide a way to&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;unconditionally&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;insert your extensions into an existing system. Of course you can still use conditions on the extension target itself to control its execution as necessary.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;allows you to specify multiple targets, and those will be run&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;in the order specified&lt;/EM&gt;. So you can use that combined with&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;to ensure any combination of targets runs in the order specified before the target you are extending. Specifying multiple targets in the&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;attribute doesn't work the same way though – instead it just means that your target should run before&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;any&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;of the targets you have specified would execute. The&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;attribute has the same behavior except that your extension target will run after&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;any&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;of the specified targets would run.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;allow you to specify targets which do not exist. This may be useful if you are creating a set of extension targets which are conveniently packaged in a single file but which may be applied to different kinds of projects with different targets. And, while you may use normal MSBuild expressions, such as property and item expressions to create your list of targets for&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;, those expressions are evaluated only once when your project is loaded. This differs from&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;which is evaluated at the time the target is run. Therefore you cannot use run-time mechanisms to generate values for these attributes.&lt;/P&gt;
&lt;H3&gt;Best Practices for Controlling Build Order&lt;/H3&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Understanding how ordering works between&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;,&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;is best illustrated by example. Consider the following:&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;Target Name="CleanSourceTree" BeforeTargets="Build"&amp;gt;
        &amp;lt;Message Text="CleanSourceTree now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="GetSourceFiles" BeforeTargets="Build"&amp;gt;
        &amp;lt;Message Text="GetSourceFiles now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The ordering of 'CleanSourceTree' and 'GetSourceFiles' relative to 'Build' is guaranteed (that is to say both 'CleanSourceTree' and 'GetSourceFiles' will in fact run before 'Build') but there is&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;no&lt;/EM&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;guarantee of ordering between 'GetSourceFiles' and 'CleanSourceTree' (and wouldn't it be embarrassing to get your source files then immediately clear them before you build)! If you want to guarantee ordering, use a combination of&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;with&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;. For instance, if you want 'CleanSourceTree' to run before 'GetSourceFiles', and both to run before 'Build', you would do the following:&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR style="HEIGHT: 91px"&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;Target Name="GetSourceFiles" BeforeTargets="Build" DependsOnTargets="CleanSourceTree"&amp;gt;
        &amp;lt;Message Text="GetSourceFiles now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="CleanSourceTree"&amp;gt;
        &amp;lt;Message Text="CleanSourceTree now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Looked at another way, 'GetSourceFiles' is your root extension target, and you use&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;to place it at a run-time location within the execution order of the project you are extending. You then build your own dependency hierarchy using&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Why not use&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;here instead of&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;? The reason is that we are expressing a dependency here, not extending the build order. For example, if 'GetSourceFiles' is set up such that it will not execute if the source tree is up to date, then we certainly wouldn't want 'CleanSourceTree' to execute first, because it would delete our sources. With&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;, 'CleanSourceTree' would execute even if 'GetSourceFiles' skips. But with&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;, 'CleanSourceTree' will never run if 'GetSourceFiles' is authored to skip when there is no work to do.&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;AfterTargets&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;work the same way, so you must use&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DependsOnTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;to guarantee the run-order of your extension targets relative to each other. For instance, if you have two targets, 'CopyOutputsForPublishing' and 'PackageOutputFiles' which are supposed to run after 'Build', but you want 'CopyOutputsForPublishing' to run before 'PackageOutputFiles', you would use the same mechanism at the last example:&lt;/P&gt;
&lt;DIV&gt;
&lt;TABLE style="BACKGROUND-COLOR: rgb(217,217,217); BORDER-COLLAPSE: collapse; background-origin: initial; background-clip: initial" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 638px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR style="HEIGHT: 91px"&gt;
&lt;TD style="PADDING-LEFT: 7px; PADDING-RIGHT: 7px"&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR&gt;    &amp;lt;Target Name="PackageOutputFiles" AfterTargets="Build" DependsOnTargets="CopyOutputsForPublishing"&amp;gt;
        &amp;lt;Message Text="PackageOutputFiles now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;
    &amp;lt;Target Name="CopyOutputsForPublishing"&amp;gt;
        &amp;lt;Message Text="CopyOutputsForPublishing now executing" /&amp;gt;
    &amp;lt;/Target&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 1em 0px"&gt;It is perfectly legitimate to specify both&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;on the same target, though the effect will likely be the same as just specifying&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;unless for some reason your target may skip the first time.&lt;/P&gt;
&lt;H2&gt;Conclusion&lt;/H2&gt;
&lt;P style="MARGIN: 1em 0px"&gt;In summary,&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;BeforeTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AfterTargets&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;provide a new, powerful way for you to extend existing build systems without directly modifying them. They provide a mechanism independent of the structure of the original project for you to insert your behaviors while retaining the original mechanisms used to guarantee ordering between your extensions.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;STRONG&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;Cliff Hudson&lt;/STRONG&gt;&lt;BR&gt;Visual Studio Platform&lt;BR&gt;MSBuild Developer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9997999" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/cliff+hudson/">cliff hudson</category></item><item><title>If your build fails with “MSB6002: The command-line for the “ResGen” task is too long”</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/02/16/if-your-build-fails-with-msb6002-the-command-line-for-the-resgen-task-is-too-long.aspx</link><pubDate>Tue, 16 Feb 2010 01:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9997998</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9997998</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/02/16/if-your-build-fails-with-msb6002-the-command-line-for-the-resgen-task-is-too-long.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you have the RC build of VS2010, you are targeting the 3.5, 3.0, or 2.0 Framework, you have a VB or C# project which has a lot of references, and you also have a lot of .resx files, your build may break with an error message like this&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;B&gt;D:\Windows\Microsoft.NET\Framework\v4.0.30128\Microsoft.Common.targets(1835,9): warning MSB6002: The command-line for the "ResGen" task is too long.&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "ResGen" into multiple calls with fewer parameters per call. [D:\Users\danmose\Documents\Visual Studio 2010\Projects\WindowsForms Application3\WindowsFormsApplication3.csproj]&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;D:\Windows\Microsoft.NET\Framework\v4.0.30128\Microsoft.Common.targets(1835,9): error MSB6003: The specified task executable "ResGen.exe" could not be run. The filename or extension is too long [D:\Users\danmose\Documents\Visual Studio 2010\Projects\resgen\WindowsFormsApplication3\WindowsFormsApplication3.csproj]&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;This bug was reported in Beta 2, but unfortunately the fix we made in time for the RC release only fixed the most common case. The other case will be fixed for the final RTM release.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Meanwhile, here’s some workarounds to get you unblocked while you use the RC build. Essentially the problem is the combined length of the paths to all your references isn’t being included when we figure out whether to break up the inputs over more than one resgen.exe command. So what we want to do is make those paths shorter. There’s three options:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(1) Retarget the project to 4.0 until RTM&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Obviously, if you’re working on a serious project, that’s likely not acceptable, but if you’re just experimenting with the RC, you might be okay with that, and it’s easy to do.&amp;nbsp; Just open up your project properties, and change the dropdown (see image)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/image_2.png" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/image_2.png"&gt;&lt;/P&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(2) If that’s not possible, remove any references your project has that it doesn’t actually use in the code. That might reduce the length of the command line just enough.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(3) If your build still fails, or there’s no references you can remove, this workaround should avoid the problem:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(a) Dial up the build verbosity to Normal in Tools&amp;gt;Options&amp;gt;Project&amp;gt;Build. Here’s the Options dialog with the dropdown circled. (You can set it back after you’re done applying the workaround)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;IMG style="WIDTH: 400px; HEIGHT: 235px" src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/image_4.png" width=400 height=235 mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/image_4.png"&gt;&lt;/P&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(b) Build the project with the problem and look in the build log for the resgen.exe command line. You’ll see your references’ paths getting passed to resgen.exe. Find where the .NET Framework references are coming from. It’s probably something like "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client”. Copy that directory.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(c) In a console window, use subst to make an unused drive letter point there. For example.,&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;B&gt;Subst j: "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client”&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/image_6.png" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/image_6.png"&gt;&lt;/P&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(d) Back in VS, open up the project properties and look for Reference Paths. It’s in slightly different places for VB and C# projects:&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;B&gt;VB&lt;/B&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/clip_image004_2.jpg" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/clip_image004_2.jpg"&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;C#&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px" mce_keep="true"&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/clip_image006_2.jpg" mce_src="http://blogs.msdn.com/blogfiles/visualstudio/WindowsLiveWriter/IfyourbuildfailswithMSB6002Thecommandlin_F46A/clip_image006_2.jpg"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;Add “j:\” or whatever your subst drive was to the Reference Paths. (If there’s already existing entries, put it at the front.)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(e) Your build should now succeed. If it doesn’t, that means that your remaining references are still too long. You can do the same technique, using a different drive, to point to some place where several other references are&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you have more than one project with this problem, you may be able to avoid setting the ReferencePath on all of them if they don’t already have a ReferencePath. Simply set an environment variable ReferencePath with the value “j:\” and launch VS from that window. Those that do already have a ReferencePath will ignore this environment variable.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 1em 0px"&gt;(4) If that’s still not enough, you can resort to extreme measures! This means modifying the GenerateResource target so that it doesn’t try to consume all those references at once, by modifying the condition in the CoreResGen target in Microsoft.Common.targets (find the line in bold below). This file&lt;STRONG&gt;&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;is in your %windir%\microsoft.net\framework\v4.0.30128.&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Be sure to back up your copy – if you make a mistake, you won’t be able to build at all.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=1&gt;&amp;lt;GenerateResource&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sources="@(EmbeddedResource)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UseSourcePath="$(UseSourcePath)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; References="@(ReferencePath)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AdditionalInputs="$(MSBuildAllProjects)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PublicClass="%(EmbeddedResource.PublicClass)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutputResources="@(EmbeddedResource-&amp;gt;'$(IntermediateOutputPath)%(ManifestResourceName).resources')"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false'"&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecuteAsTool="$(ResGenExecuteAsTool)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EnvironmentVariables="$(ResGenEnvironment)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MinimalRebuildFromTracking="$(MinimalRebuildFromTracking)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TrackFileAccess="$(TrackFileAccess)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TrackerLogDirectory="$(TrackerLogDirectory)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ToolArchitecture="$(ResGenToolArchitecture)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TrackerFrameworkPath="$(ResGenTrackerFrameworkPath)"&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TrackerSdkPath="$(ResGenTrackerSdkPath)"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Output TaskParameter="FilesWritten" ItemName="FileWrites"/&amp;gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into --&amp;gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Output TaskParameter="Sources" ItemName="_Temporary" /&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;FONT size=1&gt;&amp;lt;/GenerateResource&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;One extreme would be to add&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;and '%(EmbeddedResource.Identity)' != ''&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;to the Condition – this has the effect of causing GenerateResource to batch on every single resource individually.&amp;nbsp; However, given that you have enough resources to be hitting the 32000 character command line limit, you probably don’t want to be starting up and shutting down an individual ResGen.exe for every resource – it will work but be&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;very slow&lt;/EM&gt;. (That might be okay, if you’re building them once, then don’t plan to modify them again.)&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;A more reasonable solution, if it works with your project setup, is to add the clause and&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;'%(EmbeddedResource.RelativeDir)' == '%(EmbeddedResource.RelativeDir)'&lt;/STRONG&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;instead.&amp;nbsp; RelativeDir is a built-in metadata on all items that contains the directory part of the Include, so if you have your resources divided into several folders, GenerateResource would run once against each folder, instead of against all resources at once.&amp;nbsp; This will solve the problem as long as you don’t have more than 32000 characters worth of resources in a particular folder. If not, you could move them into several folders to make this work.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;If you have any trouble, please email me at&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="mailto:danmose@microsoft.com" mce_href="mailto:danmose@microsoft.com"&gt;danmose@microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;&lt;STRONG&gt;Dan Moseley&lt;/STRONG&gt;&lt;BR&gt;Developer Lead - MSBuild&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9997998" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Dan+Moseley/">Dan Moseley</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category></item><item><title>MSBuild Interview on CodeCast</title><link>http://blogs.msdn.com/b/msbuild/archive/2010/01/22/msbuild-interview-on-codecast.aspx</link><pubDate>Fri, 22 Jan 2010 16:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9997994</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9997994</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2010/01/22/msbuild-interview-on-codecast.aspx#comments</comments><description>&lt;SPAN style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=Apple-style-span&gt;&lt;SPAN style="LINE-HEIGHT: 18px; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: rgb(51,51,51); FONT-SIZE: 12px" class=Apple-style-span&gt;
&lt;P style="MARGIN: 1em 0px"&gt;I&amp;nbsp;had the distinct pleasure to meet up with&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://mashupx.com/" mce_href="http://mashupx.com/"&gt;Ken Levy&lt;/A&gt;&amp;nbsp;and talk about MSBuild. Ken is&amp;nbsp;responsible for the CodeCast interviews at&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://www.code-magazine.com/Index.aspx" mce_href="http://www.code-magazine.com/Index.aspx"&gt;code magazine&lt;/A&gt;.&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;The interview consists of&amp;nbsp;an in-depth technical and scenario discussion on how and why to use MSBuild, both in Visual Studio 2008 and Visual Studio 2010.&amp;nbsp; We also discussed new features for VS 2010 including:&lt;/P&gt;
&lt;UL style="MARGIN: 1em 0px; PADDING-LEFT: 2em"&gt;
&lt;LI&gt;a new Object Model&lt;/LI&gt;
&lt;LI&gt;enhanced&amp;nbsp;scheduler&lt;/LI&gt;
&lt;LI&gt;support for Visual C++&lt;/LI&gt;
&lt;LI&gt;several new MSBuild&amp;nbsp;language features&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 1em 0px"&gt;You can hear the&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://www.code-magazine.com/CodeCast/Index.aspx?messageid=9881722a-0bf3-4b50-b64e-041e9cc12e47" mce_href="http://www.code-magazine.com/CodeCast/Index.aspx?messageid=9881722a-0bf3-4b50-b64e-041e9cc12e47"&gt;full interview&lt;/A&gt;&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;on the&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="COLOR: rgb(54,109,244); TEXT-DECORATION: none" href="http://codemag.com/codecast" mce_href="http://codemag.com/codecast"&gt;CodeCast site&lt;/A&gt;.&amp;nbsp; Enjoy!&lt;/P&gt;
&lt;P style="MARGIN: 1em 0px"&gt;&lt;B&gt;Chuck England&lt;/B&gt;&lt;BR&gt;Visual Studio Platform&lt;BR&gt;Program Manager - MSBuild&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9997994" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/msbuild/">msbuild</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Chuck+England/">Chuck England</category></item><item><title>The MSBuild Team Blog Is Moving!</title><link>http://blogs.msdn.com/b/msbuild/archive/2009/11/13/the-msbuild-team-blog-is-moving.aspx</link><pubDate>Fri, 13 Nov 2009 17:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922083</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=9922083</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2009/11/13/the-msbuild-team-blog-is-moving.aspx#comments</comments><description>&lt;P&gt;&lt;FONT size=3 face="Times New Roman"&gt;We aren’t going away -- we’re just moving to a better home. To give you even more news, articles, and walkthroughs on Visual Studio, the&amp;nbsp;MSBuild Team blog is moving to become part of &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/visualstudio"&gt;&lt;FONT size=3 face="Times New Roman"&gt;The Visual Studio Blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt;.&amp;nbsp; As part of &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/visualstudio"&gt;&lt;FONT size=3 face="Times New Roman"&gt;The Visual Studio Blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt;, we’ll be joining the rest of the Visual Studio Platform Team in blogging not only about MSBuild, but other topics such as the core IDE and UI, the editor, the project system, VS extensibility, and more.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=3 face="Times New Roman"&gt;So please make sure to &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/visualstudio/rss.xml"&gt;&lt;FONT size=3 face="Times New Roman"&gt;update your RSS&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt; readers to our new home.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=3 face="Times New Roman"&gt;See you all at the new blog location – &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/visualstudio"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://blogs.msdn.com/visualstudio&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face="Times New Roman"&gt;!&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922083" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/announcements/">announcements</category></item><item><title>Inline Tasks CTP Walkthrough Update</title><link>http://blogs.msdn.com/b/msbuild/archive/2008/11/01/chuck-england.aspx</link><pubDate>Sat, 01 Nov 2008 03:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9027546</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>1</slash:comments><description>&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT face=Verdana color=#000000&gt;Well the CTP is now out, and I hope all are enjoying a preview of the new features being released in Visual Studio 2010.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;SPAN&gt;&lt;FONT face=Verdana color=#000000&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;SPAN&gt;&lt;FONT face=Verdana color=#000000&gt;Of particular interest is the&amp;nbsp;walkthrough&amp;nbsp;"&lt;FONT color=#080808 size=2&gt;&lt;STRONG&gt;How to Create an Inline Task&lt;/STRONG&gt;".&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In this walkthrough, "&lt;FONT style="FONT-SIZE: 9.5pt" face=Symbol color=#080808&gt;&lt;FONT style="FONT-SIZE: 9.5pt" face=Symbol color=#080808&gt;&lt;FONT style="FONT-SIZE: 9.5pt" face="'Verdana','sans-serif'" color=#080808&gt;&lt;B&gt;How to Create an Inline Task&lt;/B&gt;", we are highlighting our new feature "&lt;B&gt;Inline Tasks&lt;/B&gt;" that allows you to write tasks in C# right&amp;nbsp;inside your MSBuild (Project) file. This means you no longer have to build a separate assembly. It helps make custom build steps easy. Our sample walkthrough highlights how you might write a custom build rule to send an email&amp;nbsp;when your build is complete.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT face=Verdana color=#000000&gt;However, with the quick pace to get the CTP bits out the door, we realized that some critical files for the Inline Tasks walkthrough did not make it onto the VPC.&lt;BR&gt;&lt;BR&gt;In order to provide you with this really cool walkthrough, we have updated the documentation and have provided the missing bits in a zip file.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT face=Verdana color=#000000&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;SPAN&gt;&lt;FONT face=Calibri&gt;&lt;FONT face=Verdana color=#000000&gt;Please check out the post in our forums for more information.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&amp;nbsp;&amp;nbsp; &lt;A href="http://social.msdn.microsoft.com/Forums/en-US/vs2010ctpdeploy/thread/f30edddb-4183-499b-942b-105d58a78a86/" mce_href="http://social.msdn.microsoft.com/Forums/en-US/vs2010ctpdeploy/thread/f30edddb-4183-499b-942b-105d58a78a86/"&gt;http://social.msdn.microsoft.com/Forums/en-US/vs2010ctpdeploy/thread/f30edddb-4183-499b-942b-105d58a78a86/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT color=#000000&gt;Thanks,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;STRONG&gt;Chuck England&lt;/STRONG&gt;&lt;BR&gt;Visual Studio Platform&lt;BR&gt;Program Manager - Project and Build&lt;/SPAN&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9027546" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Inline+Tasks/">Inline Tasks</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/CTP/">CTP</category><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/Visual+Studio+2010/">Visual Studio 2010</category></item><item><title>MSBuild Extensions Pack releases to web</title><link>http://blogs.msdn.com/b/msbuild/archive/2008/10/14/msbuild-extensions-pack-releases-to-web.aspx</link><pubDate>Tue, 14 Oct 2008 17:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8999549</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=8999549</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2008/10/14/msbuild-extensions-pack-releases-to-web.aspx#comments</comments><description>&lt;P&gt;I am very happy to pass on news from Mike Fourie that has released v1 of a remarkably extensive &lt;A href="http://www.codeplex.com/MSBuildExtensionPack" mce_href="http://www.codeplex.com/MSBuildExtensionPack"&gt;MSBuild Extensions Pack&lt;/A&gt; on codeplex. In his words:&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The MSBuild Extension Pack is the successor to the FreeToDev MSBuild Tasks Suite and provides a collection of over 170 MSBuild tasks designed for the .net 3.5 Framework. A high level summary of what the tasks currently cover includes the following:&lt;/P&gt;
&lt;P&gt;• System Items: Certificates, COM+, Console, Date and Time, Drives, Environment Variables, Event Logs, Files and Folders, GAC, Network, Performance Counters, Registry, Services, Sound&lt;BR&gt;• Code: Assemblies, CAB Files, Code Signing, File Detokenisation, GUID’s, Mathematics, Strings, Threads, Zip&lt;BR&gt;• Applications: BizTalk 2006, Email, IIS7, MSBuild, SourceSafe, StyleCop, Team Foundation Server, Visual Basic 6, WMI&lt;/P&gt;
&lt;P&gt;Each task is documented and provided with an example in the help file. Where applicable, tasks are remote enabled, simply specify a MachineName and the task will target the remote machine.&lt;/P&gt;
&lt;P&gt;Additional tasks and improvements to the documentation will be released frequently. I would encourage users to make use of the Issues and Discussions features on CodePlex and to contribute code to help drive this project forward.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Mike's goal is to make this the standard MSBuild task pack. With the energy he is putting into it, he has a good chance of that. If you're interested in contributing drop him a line at &lt;A href="mailto:feedback@msbuildextensionpack.com" mce_href="mailto:feedback@msbuildextensionpack.com"&gt;mailto:feedback@msbuildextensionpack.com&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;-- Dan&lt;BR&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8999549" width="1" height="1"&gt;</description></item><item><title>Microsoft Source Analysis releases to web</title><link>http://blogs.msdn.com/b/msbuild/archive/2008/05/23/microsoft-source-analysis-releases-to-web.aspx</link><pubDate>Fri, 23 May 2008 19:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8540166</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=8540166</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2008/05/23/microsoft-source-analysis-releases-to-web.aspx#comments</comments><description>&lt;P&gt;Six&amp;nbsp;months ago, the developers on MSBuild began to use an internal&amp;nbsp;tool then called "StyleCop" in order to clean up our source code going forward. Think of it as a little like "FXCop" for your C# style. It flags as build warnings all kinds of deviations from a set of fairly strict style rules. We excluded all our existing source code files from inspection, since they generated thousands of warnings, and used it for all new source files, and for heavily rewritten old code, and required every check-in to be clean. &lt;/P&gt;
&lt;P&gt;For a few days, it was frustrating, mainly because you have to accept its rules over your own ingrained conventions. I don't like some of them. Frankly however many of these conventions are important only for consistency, and not intrinsically better or worse than any others. &lt;/P&gt;
&lt;P&gt;After that first week, we were surprised to find that once we got used to the rules, it was little or no effort to avoid the warnings, and the readability and consistency of our source code has improved considerably. I thought I would have to push the team to use it, but they picked it up enthusiastically, and one of the developers even enabled it on all our unit test code as well. There's no more "interesting" use of tabs, or personalized curly placement, and code reviews can focus entirely on the content of the change. As others joined our team, they picked it up easily too.&lt;/P&gt;
&lt;P&gt;Well, StyleCop has just been released as "Microsoft Source Analysis". It's a free download from &lt;A class="" href="http://blogs.msdn.com/sourceanalysis/" mce_href="http://blogs.msdn.com/sourceanalysis/"&gt;here&lt;/A&gt;. I highly recommend it.&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8540166" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/msbuild/archive/tags/stylecop/">stylecop</category></item><item><title>What's up with xxx.sln.cache?</title><link>http://blogs.msdn.com/b/msbuild/archive/2008/02/11/what-s-up-with-xxx-sln-cache.aspx</link><pubDate>Mon, 11 Feb 2008 20:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7618068</guid><dc:creator>Michael Fourie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/msbuild/rsscomments.aspx?WeblogPostID=7618068</wfw:commentRss><comments>http://blogs.msdn.com/b/msbuild/archive/2008/02/11/what-s-up-with-xxx-sln-cache.aspx#comments</comments><description>&lt;P&gt;We have an infrastructure in developer division for performance measurement. Before a feature crew integrates into their product unit branch, or a product unit does one of their periodic integrations of changes into a main branch, they must pass RPS ("regression prevention system"). This runs of the order of 100 performance scenarios in a clean, isolated environment to get very precise numbers and a whole bunch of performance counters. If certain counters regress - elapsed time, disk I/O, or memory allocations I think - the run is rejected and the performance regression must be fixed&amp;nbsp;before integration can occur. Towards Orcas RTM MSBuild was still missing a performance goal for certain command line solution build scenarios and we had to find a quick way to speed them up.&lt;/P&gt;
&lt;P&gt;When you launch MSBuild.exe on a solution file -- either directly, or using Team Build - some code has to run to create an in-memory&amp;nbsp;equivalent MSBuild format project file that MSBuild can actually build. Ideally this ought to be trivial. We would essentially construct a project file that simply ran the MSBuild task on all projects listed in the solution. In reality not all projects in the solution are in MSBuild format, most especially VC projects. It turns out that we have to load and evaluate every project in the solution to get some information we need to order the solution file correctly with respect to those VC projects, and in 3.5 we also have to figure&amp;nbsp;out possible parallelism between projects in the solution. After this is done, we build the result, which of course involves loading and evaluating those projects again to actually build them. &lt;/P&gt;
&lt;P&gt;You may have set MSBuildEmitSolution=1 in the past to see the resulting file. Editing this isn't supported, because the format will change from version to version, and it needs to be reconstructed if the solution is changed. However, it can be useful.&lt;/P&gt;
&lt;P&gt;The solution cache file is a simple serialization of the in-memory solution file to disk. Much like MSBuildEmitSolution, but we read it too. When asked to build a solution file, MSBuild will use the solution cache if it's present and is valid for the configuration, tools version, and MSBuild version requested, and is up to date with respect to the solution file itself. This saves the time spent constructing the in memory solution project. It can go right ahead and build it.&lt;/P&gt;
&lt;P&gt;This isn't very pretty, because it's exposing ugly implementation details in a plain text file. Also, there's no intermediate directory for a solution file like there is for a project, so we have to write it in the same directory, which is impolite, and not desirable if you wish to keep your source tree clean (for example, you have redirected your intermediate and output directories elsewhere). There is one other issue. You can't safely build the solution concurrently with two different configurations, because the configuration isn't part of the filename, and the content of the file is configuration specific. Team Build needs to do this.&lt;/P&gt;
&lt;P&gt;The workaround for both issues is to set an environment variable to disable creating this file. Set MSBuildUseNoSolutionCache=1. &lt;/P&gt;
&lt;P&gt;When solutions and VC projects are MSBuild format this kind of problem will go away.&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;[edit: fixed typo spotted by Cullen Waters]&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7618068" width="1" height="1"&gt;</description></item></channel></rss>
