<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Peli's Farm - Pex, Stubs, Moles, QuickGraph, MbUnit, Reflector Addins - Build</title>
    <link>http://blog.dotnetwiki.org/</link>
    <description>TouchDevelop, Pex4Fun, Rise4Fun, Pex, Moles, QuickGraph, MbUnit, Reflector Addins</description>
    <language>en-us</language>
    <copyright>Jonathan 'Peli' de Halleux</copyright>
    <lastBuildDate>Thu, 05 Jul 2007 16:02:38 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>jonathan.dehalleux@gmail.com</managingEditor>
    <webMaster>jonathan.dehalleux@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blog.dotnetwiki.org/Trackback.aspx?guid=2065625c-1c8d-46ca-bd28-3e9b1a1c3972</trackback:ping>
      <pingback:server>http://blog.dotnetwiki.org/pingback.aspx</pingback:server>
      <pingback:target>http://blog.dotnetwiki.org/PermaLink,guid,2065625c-1c8d-46ca-bd28-3e9b1a1c3972.aspx</pingback:target>
      <dc:creator>Jonathan de Halleux</dc:creator>
      <wfw:comment>http://blog.dotnetwiki.org/CommentView,guid,2065625c-1c8d-46ca-bd28-3e9b1a1c3972.aspx</wfw:comment>
      <wfw:commentRss>http://blog.dotnetwiki.org/SyndicationService.asmx/GetEntryCommentsRss?guid=2065625c-1c8d-46ca-bd28-3e9b1a1c3972</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://research.microsoft.com/pex" target="_blank">Pex</a> has a couple samples
that get bundled in our installer. We have them in our main solution so that we get
the benefits of Refactoring (that they still compiled :)). This approach has one little
problem: the sample projects are referencing the <a href="http://research.microsoft.com/pex" target="_blank">Pex</a> projects...
which are not shipped! If packaged as is, they'll never compile on the user's
machine.
</p>
        <p>
          <strong>ProjectReference -&gt; Reference</strong>
        </p>
        <p>
We solved this problem by implementing an MSBuild task that 'patches' .csproj project
files by replacing ProjectReference nodes with Reference:
</p>
        <blockquote>
          <p>
            <font face="Courier New">&lt;ProjectReference Include="..\..\..\Pex\Framework\Microsoft.Pex.Framework.csproj"&gt;<br />
  ...<br />
&lt;/ProjectReference&gt; </font>
          </p>
        </blockquote>
        <p>
becomes
</p>
        <blockquote>
          <p>
            <font face="Courier New">&lt;Reference Include="Microsoft.Pex.Framework"&gt;...&lt;/Reference&gt;</font>
          </p>
        </blockquote>
        <p>
There's a bit of coding involved to it (resolving the assembly name, selecting the
appropriate projects, etc...) but that's basically it :)
</p>
        <img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=2065625c-1c8d-46ca-bd28-3e9b1a1c3972" />
      </body>
      <title>Build It: Keeping the Samples in Sync (and shipping them)</title>
      <guid isPermaLink="false">http://blog.dotnetwiki.org/PermaLink,guid,2065625c-1c8d-46ca-bd28-3e9b1a1c3972.aspx</guid>
      <link>http://blog.dotnetwiki.org/2007/07/05/BuildItKeepingTheSamplesInSyncAndShippingThem.aspx</link>
      <pubDate>Thu, 05 Jul 2007 16:02:38 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://research.microsoft.com/pex" target=_blank&gt;Pex&lt;/a&gt; has a couple samples
that get bundled in our installer. We have them in our main solution so that we get
the benefits of Refactoring (that they still compiled :)). This approach has one little
problem: the sample projects are referencing the&amp;nbsp;&lt;a href="http://research.microsoft.com/pex" target=_blank&gt;Pex&lt;/a&gt; projects...
which&amp;nbsp;are not shipped! If packaged as is, they'll never compile on the user's
machine.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;ProjectReference -&amp;gt; Reference&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
We solved this problem by implementing an MSBuild task that 'patches' .csproj project
files by replacing ProjectReference nodes with Reference:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;ProjectReference Include="..\..\..\Pex\Framework\Microsoft.Pex.Framework.csproj"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;lt;/ProjectReference&amp;gt; &lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
becomes
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Reference Include="Microsoft.Pex.Framework"&amp;gt;...&amp;lt;/Reference&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
There's a bit of coding involved to it (resolving the assembly name, selecting the
appropriate projects, etc...) but that's basically it :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.dotnetwiki.org/aggbug.ashx?id=2065625c-1c8d-46ca-bd28-3e9b1a1c3972" /&gt;</description>
      <comments>http://blog.dotnetwiki.org/CommentView,guid,2065625c-1c8d-46ca-bd28-3e9b1a1c3972.aspx</comments>
      <category>Build</category>
      <category>Pex</category>
    </item>
  </channel>
</rss>