<?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 : Neil Enns</title><link>http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx</link><description>Tags: Neil Enns</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Why are build numbers limited to 65535?</title><link>http://blogs.msdn.com/msbuild/archive/2007/01/03/why-are-build-numbers-limited-to-65535.aspx</link><pubDate>Wed, 03 Jan 2007 21:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1405656</guid><dc:creator>msbuild</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/1405656.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=1405656</wfw:commentRss><description>&lt;P&gt;In my &lt;A class="" href="http://blogs.msdn.com/msbuild/archive/2007/01/03/fixing-invalid-version-number-problems-with-the-assemblyinfotask.aspx" mce_href="http://blogs.msdn.com/msbuild/archive/2007/01/03/fixing-invalid-version-number-problems-with-the-assemblyinfotask.aspx"&gt;previous post&lt;/A&gt; I explained how to fix the issue with the default date format provided in the AssemblyVersionTask. Several people encountered the problem with the arrival of 2007, and all of them sent me mail about it :) After providing them with the fix, a few people wrote back&amp;nbsp;and commented (with variying degrees of politeness) that my code was bad and that I should change it to support a larger build number.&lt;/P&gt;
&lt;P&gt;That's a mighty fine suggestion, but unfortunately the limitation isn't in my code, it's &lt;A class="" href="http://msdn2.microsoft.com/en-gb/library/aa381058.aspx" mce_href="http://msdn2.microsoft.com/en-gb/library/aa381058.aspx"&gt;imposed by the operating system&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Binary version number for the file. The &lt;I&gt;version&lt;/I&gt; consists of two 32-bit integers, defined by four 16-bit integers. For example, "FILEVERSION 3,10,0,61" is translated into two doublewords: 0x0003000a and 0x0000003d, in that order. Therefore, if &lt;I&gt;version&lt;/I&gt; is defined by the &lt;B&gt;DWORD&lt;/B&gt; values &lt;I&gt;dw1&lt;/I&gt; and &lt;I&gt;dw2&lt;/I&gt;, they need to appear in the &lt;B&gt;FILEVERSION&lt;/B&gt; statement as follows: &lt;CODE&gt;HIWORD(dw1)&lt;/CODE&gt;, &lt;CODE&gt;LOWORD(dw1)&lt;/CODE&gt;, &lt;CODE&gt;HIWORD(dw2)&lt;/CODE&gt;, &lt;CODE&gt;LOWORD(dw2)&lt;/CODE&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, I'm sad to say, we will be stuck with 16-bit build numbers forever.&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1405656" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>Fixing invalid version number problems with the AssemblyInfoTask</title><link>http://blogs.msdn.com/msbuild/archive/2007/01/03/fixing-invalid-version-number-problems-with-the-assemblyinfotask.aspx</link><pubDate>Wed, 03 Jan 2007 21:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1405612</guid><dc:creator>msbuild</dc:creator><slash:comments>20</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/1405612.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=1405612</wfw:commentRss><description>&lt;P&gt;The arrival of 2007 bought a flurry of e-mails to the MSBuild team from people having trouble with the AssemblyInfoTask. The symptom is simple to describe -&amp;nbsp;the builds start to fail with the following error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;STRONG&gt;Error emitting 'System.Reflection.AssemblyVersionAttribute' attribute -- 'The version specified '1.0.70102.1' is invalid&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Arial size=2&gt;The fix to get builds going again is to change the date format used to generate&amp;nbsp;the build number to something other than the default "yyMMdd". The date formats are in Microsoft.VersionNumber.target, located in %program files%\MSBuild\Microsoft\AssemblyInfoTask, and there are two of them (one for file version and one for assembly version). You can use any format you want. Within Visual Studio we're now using 01MMdd.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Arial size=2&gt;Note that you may have to go in and hand-edit your assemblyinfo.* files to change their version number back to a default starting point of 1.0.0.0 to get your builds going again.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Arial size=2&gt;Questions or problems after doing the above? Contact us using the e-mail link at the top of this page.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Arial size=2&gt;[ Author: Neil Enns ]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1405612" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/Known+Issues/default.aspx">Known Issues</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/AssemblyVersionInfo/default.aspx">AssemblyVersionInfo</category></item><item><title>Hotfix is Now Available for Warning C4945</title><link>http://blogs.msdn.com/msbuild/archive/2006/07/10/661747.aspx</link><pubDate>Tue, 11 Jul 2006 01:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661747</guid><dc:creator>msbuild</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/661747.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=661747</wfw:commentRss><description>&lt;P&gt;If you've been reading our forums you may have seen the &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=244850&amp;amp;SiteID=1"&gt;long-running thread&lt;/A&gt; regarding warning C4945 slowing down certain types of builds. This issue was also reported through our Connect feedback center as &lt;A href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=123509"&gt;issue 123509&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I'm pleased to announce that we have a hotfix available for this problem, and that it's now available through our &lt;A href="http://www.microsoft.com/services/microsoftservices/srv_support.mspx"&gt;product support services&lt;/A&gt;. To obtain the hotfix you should contact your local product support office and ask for the hotfix in KB article 922271. You should only request this hotfix if you have seen this specific issue, as it will not address or change anything else other than this one specific problem.&lt;/P&gt;
&lt;P&gt;Note that if you look for this KB article in our knowledge base database you likely won't see it. Don't worry, that's because we're still writing the actual article and it won't be out for a couple of weeks. The hotfix is available, however, and your product support contact should be able to it without issue.&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=661747" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>A New Tool For Visually Editing Build Process</title><link>http://blogs.msdn.com/msbuild/archive/2006/06/06/619453.aspx</link><pubDate>Wed, 07 Jun 2006 00:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:619453</guid><dc:creator>msbuild</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/619453.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=619453</wfw:commentRss><description>&lt;P&gt;Eugene sent us mail today to let us know that his company has released a &lt;A href="http://www.attrice.info/msbuild/index.htm"&gt;neato little freeware tool&lt;/A&gt; to visually edit MSBuild files. A quick glance at the website shows an impressive list of features for v1:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Load and modify any file complying to MSBuild schema 
&lt;LI&gt;View build project structure in a tree view that displays tasks used in build, property groups and properties, item groups and items, targets and targets tasks and imported build projects. 
&lt;LI&gt;Show or hide presentation of imported definitions in a project tree view 
&lt;LI&gt;View MSBuild project raw XML source as you modify the project 
&lt;LI&gt;Modify project default targets 
&lt;LI&gt;Add or remove tasks used in build project from external assembly 
&lt;LI&gt;Add, remove or modify property groups 
&lt;LI&gt;Add, remove or modify properties in property groups 
&lt;LI&gt;Add, remove or modify item groups 
&lt;LI&gt;Add, remove or modify items in item groups 
&lt;LI&gt;Add, remove or modify targets 
&lt;LI&gt;Add, remove or modify selected target's tasks, tasks order 
&lt;LI&gt;Modify selected task properties (including output properties specification) 
&lt;LI&gt;Import or remove external build projects 
&lt;LI&gt;Open any imported project from the loaded project &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Nicely done guys!&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=619453" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>What Does This MSBuild Snippet Do?</title><link>http://blogs.msdn.com/msbuild/archive/2006/05/18/601146.aspx</link><pubDate>Thu, 18 May 2006 20:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:601146</guid><dc:creator>msbuild</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/601146.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=601146</wfw:commentRss><description>&lt;P&gt;It's been a while since we've had a little quiz on MSBuild.&lt;/P&gt;
&lt;P&gt;Over the last couple of days the MSBuild team has been enjoying working up solutions to &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=392126&amp;amp;SiteID=1"&gt;a question &lt;/A&gt;over in our forums. Last night Faisal and Jeff concoted some MSBuild script that, to be honest, made my head turn sideways and then inside out.&lt;/P&gt;
&lt;P&gt;Given the following MSBuild file, what is the output of the build?&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;Project&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;xmlns&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;ItemGroup&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupA&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file1.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupA&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file2.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupA&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file3.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupA&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file4.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;ItemGroup&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;ItemGroup&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupB&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file1.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupB&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file3.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;GroupB&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;file5.txt&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;ItemGroup&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Target&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Build&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;CreateItem&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;@(GroupA)&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Condition&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;'%(Identity)' != '' and '@(GroupA)' != '' and '@(GroupB)' != ''&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Output&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;TaskParameter&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Include&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;ItemName&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;GroupC&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;CreateItem&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Message&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Text&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;@(GroupC)&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;Target&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;BR&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;Project&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;No running this on the command-line to find out! That'd be cheating :) See if you can figure it out in your noggin first, and then post your thoughts.&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=601146" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>MSBuild Extras - Toolkit for .NET 1.1 ships!</title><link>http://blogs.msdn.com/msbuild/archive/2006/05/17/600347.aspx</link><pubDate>Thu, 18 May 2006 00:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:600347</guid><dc:creator>msbuild</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/600347.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=600347</wfw:commentRss><description>&lt;P&gt;It's been a little while (understatement!) since we've blogged something, but today we've got a good one for you.&lt;/P&gt;
&lt;P&gt;The MSBuild Extras - Toolkit for .NET 1.1 (a.k.a. MSBee) shipped today!&lt;/P&gt;
&lt;P&gt;You can download it at &lt;A href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=MSBee&amp;amp;ReleaseId=18"&gt;Codeplex&lt;/A&gt;. Enjoy!&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=600347" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>How To: Remove the Up-To-Date Check From the AssemblyInfoTask</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/28/how-to-remove-the-up-to-date-check-from-the-assemblyinfotask.aspx</link><pubDate>Tue, 28 Mar 2006 23:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:563461</guid><dc:creator>msbuild</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/563461.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=563461</wfw:commentRss><description>&lt;P&gt;Every couple of weeks I get mail from someone who is using the AssemblyInfoTask on a build machine under source control. The question typically goes like this:&lt;/P&gt;
&lt;P&gt;I added the .targets file to my project, and it works fine on my dev machine, but doesn't do anything when I'm running it in the build lab. What's wrong? Help!&lt;/P&gt;
&lt;P&gt;The reason it "doesn't do anything" is because the default Microsoft.VersionNumber.Targets file includes MSBuild attributes that instruct the build engine to check timestamps on input and output files. These were added because it doesn't make much sense to increment the version number on an assembly if nothing is gettting re-built. This can happen if MSBuild does an incremental build on the project.&lt;/P&gt;
&lt;P&gt;In the build lab, however, all of the input files (.cs files, generally) and the output file (assemblyinfo.cs) wind up with the same timestamps when they are synchronized from the soruce code control server.&lt;/P&gt;
&lt;P&gt;To resolve this, simply remove the Inputs and Outputs attributes from the &amp;lt;Target&amp;gt; tag in the Microsoft.VersionNumber.Targets file. It should wind up looking like this:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;Target&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Name&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;UpdateAssemblyInfoFiles&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=563461" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/AssemblyVersionInfo/default.aspx">AssemblyVersionInfo</category></item><item><title>Beta 2 of the MSBuild Toolkit for .NET Framework v1.1  is Out!</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/25/560471.aspx</link><pubDate>Sat, 25 Mar 2006 02:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:560471</guid><dc:creator>msbuild</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/560471.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=560471</wfw:commentRss><description>&lt;P&gt;Craig just announced over on his blog that &lt;A HREF="/clichten/archive/2006/03/24/560201.aspx"&gt;Beta 2 is available&lt;/A&gt;. New features in this release include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Support for the ResolveComReference task! &lt;/LI&gt;
&lt;LI&gt;Redirecting the LC task to target .NET 1.1 &lt;/LI&gt;
&lt;LI&gt;Defining a FX1_1 constant to let you exclude .NET 2.0 specific code &lt;/LI&gt;
&lt;LI&gt;Providing a BaseFX1_1OutputPath property for replacing the default 'bin\FX1_1' base path. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=560471" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/Tools/default.aspx">Tools</category></item><item><title>What Does MSBuild Have to do With The Future of Game Development?</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/21/556097.aspx</link><pubDate>Tue, 21 Mar 2006 03:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:556097</guid><dc:creator>msbuild</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/556097.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=556097</wfw:commentRss><description>&lt;P&gt;Today the folks in our game studios team (XNA) used the Game Developer's Conference to roll out the first major public viewing of what they've been hard at work on. If you want to read about the overall technology preview they released you can look at &lt;A HREF="/mklucher/archive/2006/03/16/552355.aspx"&gt;Michael's blog entry&lt;/A&gt;. If you want to see what the press is saying, there are &lt;A href="http://news.teamxbox.com/xbox/10507/Microsoft-Unveils-XNA-Framework-Opens-Xbox-Live-Server-Platform-to-Developers-and-Publishers/"&gt;several&lt;/A&gt; &lt;A href="http://www.gamasutra.com/php-bin/news_index.php?story=8580"&gt;articles&lt;/A&gt; &lt;A href="http://biz.yahoo.com/prnews/060320/sfm082.html?.v=40"&gt;floating&lt;/A&gt; &lt;A href="http://www.xbox365.com/news.cgi?id=GGruLHPiPi03200608"&gt;around&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;"Blah blah blah", I'm sure you're thinking. "Yeah yeah, Microsoft announces some new technology. Biggy dealydo. I'm reading this blog for MSBuild content. Why on earth should I care?"&lt;/P&gt;
&lt;P&gt;Ah, but have faith :) It gets very interesting when you dig a little deeper. The CTP includes something called "XNA Build":&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;&lt;FONT color=#0000ff&gt;Microsoft® XNA™ Build is a tool which will help game studios manage the growing complexities of their game content builds. We invite you to install this pre-release into a non-production environment to learn more about how XNA Build will reduce development complexities.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Michael's blog includes a few more details:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;&lt;FONT color=#0000ff&gt;This is the heart of our release at GDC this year. XNA Build is a set of tools that’s designed to help studios with both their code and asset pipelines by providing ways to create, debug, maintain, and optimize those pipelines throughout their studio. XNA Build has really three major components to it, the technology it’s built on, the custom XNA tasks behind it, and the graphical Designer. XNA Build’s underlying technology is powered by MSBuild, a scriptable XML-based build solution that uses pluggable components called “Tasks” to extend the functionality of MSBuild. We have taken the time to construct a set of XNA-specific tasks which facilitate things like dependency tracking, unused file tracking, and analysis using your own custom in-house tools. That’s something that I’d really like you to walk away with: we’re not trying to get you to change or write custom tools to work in our system; we want to work with yours. Finally, there is the Designer. Right now an early prototype, it allows people who aren’t familiar with XML coding or working with batch files to author complex build systems using a drag, drop, and connect methodology.&lt;/FONT&gt; &lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wooo, that sounds pretty cool doesn't it? Based on MSBuild? A graphical designer? No wei! Wei!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Got your interest now? Want to see it in action? :) Check out the &lt;A href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;amp;p=5&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=&amp;amp;u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d80af86b1-9dc6-4894-87b4-47de83396a0e%26DisplayLang%3den"&gt;overview presentation on XNA&lt;/A&gt;, as well as the presentation on &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6b0c78de-495f-4440-990d-ebd7b727a7b7&amp;amp;DisplayLang=en"&gt;advanced XNA Build topics&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=556097" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>How To: Bypass Post-Build Steps in a Build Lab Environment</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/10/546590.aspx</link><pubDate>Sat, 11 Mar 2006 02:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:546590</guid><dc:creator>msbuild</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/546590.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=546590</wfw:commentRss><description>&lt;P&gt;(Can you tell I'm going through my folder of interesting MSBuild questions today?)&lt;/P&gt;
&lt;P&gt;Here's another good question that came across our internal discussion alias last week:&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff&gt;Is there a quick and easy way to bypass the PostBuild steps in a project file that was created with VS.NET 2005?&amp;nbsp;I am trying to set up a master build project that will be compiling a large number of other projects, some that contain PostBuild steps that are not appropriate for our master build.&amp;nbsp;Is there something I can define that will then cause the PostBuild steps to be skipped?&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I actually didn't know the answer to this one off the top of my head, but since the entire build process is available for the world to see, it didn't take much to figure it out. I cracked open the Microsoft.Common.Targets file in Visual Studio and looked at how the PostBuildStep is set up. Here's an excerpt from the file:&lt;/P&gt;
&lt;P&gt;&amp;lt;Target Name="PostBuildEvent" Condition="'$(PostBuildEvent)'!='' and [...]&amp;gt;&lt;/P&gt;
&lt;P&gt;Notice how the condition is set up. In the build lab, you can simply pass /p:PostBuildEvent="" on the command line to disable all the post build events in the included projects.&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=546590" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/How+To/default.aspx">How To</category></item><item><title>Why Doesn't Delete Take Wildcards?</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/09/546588.aspx</link><pubDate>Fri, 10 Mar 2006 02:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:546588</guid><dc:creator>msbuild</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/546588.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=546588</wfw:commentRss><description>&lt;P&gt;Here's another question from our internal conversion discussion alias that came through last week:&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff&gt;Does the &lt;A href="http://msdn2.microsoft.com/en-us/library/7wd15byf(VS.80).aspx"&gt;Delete&lt;/A&gt; task in MSBuild not use wildcards? The documentation doesn’t say anything about it but that seems to be the behavior I am seeing. I can always create an ItemList then pass that into delete, but I wanted to verify this was “right”.&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;The person asking the question is correct: the right way to do this is to create an &lt;A href="http://msdn2.microsoft.com/en-us/library/646dk05y(VS.80).aspx"&gt;ItemGroup&lt;/A&gt; that contains the list of items you want to delete. Generally you'll do this by specifying each file individually, although you can use a wildcard in the ItemGroup's Include attribute to pick up files as well. You then pass this ItemGroup into the delete task to perform the delete.&lt;/P&gt;
&lt;P&gt;Why do we do it this way? We really wanted to ensure people passed around strongly-typed lists of objects through the build process, so things like metadata can flow through the entire build. If you have an individual task like delete take wildcards, people will tend to use the wildcards in the task directly instead of creating a strongly-typed group first.&lt;/P&gt;
&lt;P&gt;Of course, sometimes you can't know ahead of time what the item group will be, and that's why we have the &lt;A href="http://msdn2.microsoft.com/en-us/library/s2y3e43x(VS.80).aspx"&gt;CreateItem&lt;/A&gt; task (which is, as we've found during the conversion of our internal build process, often required and never very pretty...).&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=546588" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>How To: Distribute Your Custom Task and .Targets file</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/09/546627.aspx</link><pubDate>Thu, 09 Mar 2006 22:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:546627</guid><dc:creator>msbuild</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/546627.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=546627</wfw:commentRss><description>&lt;P&gt;We've had variations of the same question on how to distribute tasks come through both internal and external channels in the last couple of weeks. Here's one example:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;If we have a product that is installing custom MSBuild tasks, are there any type of guidelines on where they should be installed, do they need to be registered, etc.?&lt;/FONT&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The good news is you don't have to register anything at all. You just need to figure out what the best directory is to install your goo. Typically there's two pieces of goo that need to be installed: the assembly with the task(s) in it, and the .targets file that includes a &amp;lt;UsingTask&amp;gt;, assorted properties, and perhaps even a target override.&lt;/P&gt;
&lt;P&gt;It turns out that you'll probably want your installer to offer the user the choice of two installation points: one for installing your new MSBuild magic on a developer's machine, and another for installing it in some sort of build-lab environment. Here's a little table with the suggested installation locations:&lt;/P&gt;
&lt;P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;&lt;/TH&gt;
&lt;TH&gt;Developer Machine &lt;/TH&gt;
&lt;TH&gt;Build Lab &lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Assembly &lt;/TD&gt;
&lt;TD&gt;Global Assembly Cache &lt;/TD&gt;
&lt;TD&gt;Location of user's choosing &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;.Targets File &lt;/TD&gt;
&lt;TD&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms164309.aspx"&gt;$(MSBuildExtensionsPath)&lt;/A&gt; &lt;/TD&gt;
&lt;TD&gt;Location of user's choosing &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;This requires your setup to actually have two different .targets files, since the &amp;lt;UsingTask&amp;gt; will be different depending on where the task assembly is installed.&lt;/P&gt;
&lt;P&gt;To see all this in action I suggest downloading the &lt;A href="http://www.gotdotnet.com/codegallery/codegallery.aspx?id=93d23e13-c653-4815-9e79-16107919f93e"&gt;AssemblyInfoTask sources&lt;/A&gt;. It includes a setup project that gives the user of installing the assembly into either the GAC or to their local application data folder. This could be extended to allow installation to GAC or a folder of the user's choosing.&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=546627" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/How+To/default.aspx">How To</category></item><item><title>MSBuild.GlobalEngine vs "new Engine()": What's the Difference?</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/08/546613.aspx</link><pubDate>Thu, 09 Mar 2006 02:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:546613</guid><dc:creator>msbuild</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/546613.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=546613</wfw:commentRss><description>&lt;P&gt;Earlier this week we got the following question from one of our VSIP partners:&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff&gt;What is the difference between using &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/microsoft.build.buildengine.engine.globalengine(VS.80).aspx"&gt;&lt;FONT color=#0000ff&gt;MSBuild.GlobalEngine&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#0000ff&gt; or “&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms123674(VS.80).aspx"&gt;&lt;FONT color=#0000ff&gt;new Engine()&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#0000ff&gt;” to build a project programmatically?&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I actually never knew there were two ways to do this. Thankfully Rajeev not only knew there were, but knew what the difference was. His response also provides another glimpse into how Visual Studio and MSBuild &lt;A HREF="/msbuild/archive/2006/01/06/508981.aspx"&gt;interoperate&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Engine.GlobalEngine is just an instance of the Engine that was also created with "new Engine()", and the only point of it is so that multiple project systems in the same process (e.g., devenv.exe) can easily share the same engine object.&amp;nbsp;The benefit in all the project systems sharing the same Engine object comes when you have project-to-project references between the various projects.&amp;nbsp;If project A instantiated its own Engine object instead of using GlobalEngine, and it had a P2P reference to Project B, then Project A would end up loading a fresh copy of Project B from disk, instead of using the copy that was probably already loaded by the IDE as part of a different Engine object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;The main point is that projects in different Engine objects cannot talk to each other.&amp;nbsp;So if you want projects to be able to talk to each other, it's best to have them part of the same Engine object, and the easiest way to do that for a VS package is to use the GlobalEngine.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=546613" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item><item><title>How To: Exclude Multiple Files From a Wildcard</title><link>http://blogs.msdn.com/msbuild/archive/2006/03/08/546583.aspx</link><pubDate>Thu, 09 Mar 2006 01:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:546583</guid><dc:creator>msbuild</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/546583.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=546583</wfw:commentRss><description>&lt;P&gt;We got the following question on our internal conversion discussion alias today:&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff&gt;Is there a way to exclude two or more items from an ItemGroup using the “exclude” attribute without using a wildcard?&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It turns out the way to do this wasn't clear from our existing &lt;A href="http://msdn2.microsoft.com/en-us/library/ms164283(VS.80).aspx"&gt;MSDN Documentation&lt;/A&gt;. Brett, our documentation writer, has a fix in the queue for the next MSDN refresh, but in the mean time here is the answer from Dan:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Verdana"&gt;&amp;lt;ItemGroup&amp;gt;&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 class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Verdana"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Compile Include="*.cs" Exclude="a.cs;b.cs"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: Verdana"&gt;&amp;lt;/ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=546583" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category><category domain="http://blogs.msdn.com/msbuild/archive/tags/How+To/default.aspx">How To</category></item><item><title>Wildcard Expansion in Project Files</title><link>http://blogs.msdn.com/msbuild/archive/2006/02/22/537150.aspx</link><pubDate>Wed, 22 Feb 2006 22:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:537150</guid><dc:creator>msbuild</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/msbuild/comments/537150.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msbuild/commentrss.aspx?PostID=537150</wfw:commentRss><description>&lt;P&gt;We got a question today on our internal discussion alias about the behaviour of wildcard expansions in project files. It went roughly like this:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;I have the following target declared in my project file:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;lt;Target Name="MyTarget" Inputs="$(MyInputs)" Outputs="$(MyOutputDirectory)\*"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;However, when I build I get the following output:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Output file "d:\Sources\*" does not exist.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Why?&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is because of how wildcards are processed by the MSBuild engine. Rajeev replied with the list of where wildcards are expanded:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The Include attribute of a statically declared item: &amp;lt;MyItem Include="*.txt" /&amp;gt; 
&lt;LI&gt;The Exclude attribute of a statically declared item: &amp;lt;MyItem Include="*.txt" Exclude="a*.txt"/&amp;gt; 
&lt;LI&gt;The Include attribute of the CreateItem task: &amp;lt;CreateItem Include="*.txt"/&amp;gt; 
&lt;LI&gt;The Exclude attribute of the CreateItem task: &amp;lt;CreateItem Include="*.txt" Exclude="a*.txt"/&amp;gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Do do what the original poster wants you have to create an itemgroup first that has the wildcard in it, and then use that itemgroup as the parameter to the Output attribute.&lt;/P&gt;
&lt;P&gt;Jeff replied a second time to the thread to provide more background on why it works this way:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Target outputs are useful to MSBuild when deciding whether or not a Target is up to date and hence whether or not it should be built.&amp;nbsp; MSBuild decides a Target is up to date if each of the files in the Outputs list is newer than each of the files in the Inputs list.&amp;nbsp;In particular, if any file in the Outputs list does not exist, the Target is built.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Of course, a wildcard will always describe exactly what’s on disk when it’s evaluated - rather than what should be on disk once the Target has executed.&amp;nbsp; If we supported wildcards in the actual targets input and output tags this would break the up to date check.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Consider this example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Inputs=x.cs,y.cs,z.cs, each with file change times of 1/1/2000 12:00&lt;BR&gt;Outputs=x.pdb, with file change times of 1/1/2001 12:00 (constructed with a wildcard in the output tag if we supported it)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Now if x.dll is produced by this target, but had been deleted from disk, MSBuild would mistakenly skip this target because the wildcard didn’t include it and each of the files the wildcard included are coincidentally newer than those in the inputs...&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now you know :)&lt;/P&gt;
&lt;P&gt;[ Author: Neil Enns ]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=537150" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msbuild/archive/tags/Neil+Enns/default.aspx">Neil Enns</category></item></channel></rss>