<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Build and Deployment</title>
        <link>http://geekswithblogs.net/colinbo/category/4247.aspx</link>
        <description>Items related to automated build and deployment processes.</description>
        <language>en-CA</language>
        <copyright>Colin Bowern</copyright>
        <managingEditor>colinbowern@hotmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Greedy Application Mentality with TFS</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/06/08/81259.aspx</link>
            <description>&lt;P&gt;I set off intending to experiment with Team Foundation Server recently to potentially replace our Subversion deployment.&amp;nbsp; As I built up my virtual machine for the TFS application tier I went to install the data tier on our beefy 64-bit SQL Server machine and was stopped by a problem:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;SQL Server 2005 Reporting Services service is installed on the data-tier computer. The service should instead be on the application-tier computer. Uninstall SQL Server 2005 Reporting Services from the data-tier computer and run setup again. &lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Upon &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=463203&amp;amp;SiteID=1&amp;amp;mode=1"&gt;further investigation&lt;/A&gt; I found out that TFS seems to want to be isolated in it's data tier.&amp;nbsp; Sure we could everything onto a single box but I've got a perfectly good SQL Server which has three instances of SQL Server to support both production and development needs for the office.&amp;nbsp; Why would I want to install yet another copy of SQL Server which I need to manage, monitor, and patch?&amp;nbsp; I am amazed to see&amp;nbsp;a mentality of application development&amp;nbsp;that &amp;#8220;applications require their own dedicated server&amp;#8220;.&amp;nbsp; Sometimes I wonder if the folks in Redmond realize that not all of us have billions of dollars in the bank to buy servers?&amp;nbsp; I want to maximize the investment in my hardware which means stacking several applications onto a single server.&amp;nbsp; Wasn't that the message the Windows Server 2003 marketing folks wanted to convey -- &amp;#8220;Do more with less&amp;#8220;?&amp;nbsp; Applications should only need a dedicated server when their resource usage profile causes resource contention - not because a developer decided to assume that the server would contain nothing else.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Reviewing the TFS installation guide again I noticed a related comment which made me chuckle:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;Team Foundation Server cannot be installed on a domain controller and does not support installing other servers such as Exchange Server or Host Integration Server on the same computer.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I would really be interested in knowing why they wrote this.&amp;nbsp; What's so bad about a machine running as a domain controller or Exchange Server?&amp;nbsp; They don't mutate the system into a horribly unusable state last I checked.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=81259"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=81259" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/81259.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/06/08/81259.aspx</guid>
            <pubDate>Fri, 09 Jun 2006 01:07:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/06/08/81259.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/81259.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/81259.aspx</trackback:ping>
        </item>
        <item>
            <title>Installing with Native Images and Debug Symbols</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/03/23/73200.aspx</link>
            <description>&lt;P&gt;For some of our projects we're looking to not only deploy assemblies to the GAC, but generate native images and copy the debug symbols to the GAC (which buys us line numbers in exceptions -- it's much easier to debug when you know the line number!).  I've been experimenting with the VS2005 Setup Project to try and automate the process.  During this experimentation realized a number of short comings:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Cannot have an assembly be used as a Custom Action and deployed into the GAC at the same time.&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;: Move Installer class to a separate assembly.&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;There's no fancy &amp;#8220;Generate Native Image&amp;#8220; flag.&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;: Write a Custom Action to generate a native image.&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;The Global Assembly Cache folder is reserved for signed outputs only.&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;: Write a Custom Action to copy the unsigned outputs as part of the install.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;It seems as usual the Setup Project that ships with VS2005 is weak in a number of areas (e.g. deployment of multiple instance applications).  If the product groups were all forced to use the Setup Project to deploy all Microsoft apps I bet it would change drastically (hint hint MSFT).  At this point I don't want to pay a billion dollars for InstallShield (which in past experience tends to crash numerous times), nor do I want to have to script out something for a seamingly common set of functions that I'm sure a lot of us developers have needs for.&lt;/P&gt;
&lt;P&gt;For anyone who is trying to NGen or copy the Debug Symbols (aka Program Database, PDB) to the GAC during installation below is a snippet of my Installer class.  A few notes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;This class has been tested with the RTM version of the .NET Framework 2.0.&lt;/LI&gt;
&lt;LI&gt;None of the paths are hard-coded.  I wanted to future-proof it so that it doesn't break under future builds and so it would work in scenarios where people moved the GAC.&lt;/LI&gt;
&lt;LI&gt;Since the installer remains separate from the rest of the classes in my solution I did hard code the assembly names.  I know it's not the greatest idea but it works for me partly because they all share the same version number and public key token.  If you needed to handle other assemblies you could probably go with a manifest xml file or something like that as the source and then read the version numbers and tokens from the GAC.&lt;/LI&gt;
&lt;LI&gt;Debug Symbols need to reside in the same folder as the installer class.  Once again, you can feel free to modify the code to be more picky.  The Context propery supports parameters which can be passed in through the CustomActionData propery of the Custom Action.&lt;/LI&gt;
&lt;LI&gt;I couldn't copy debug symbols during the Install phase as the destination folders in the GAC didn't exist.  As such it ended up as part of the Commit phase.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;And now on to the code:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 11pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Consolas"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    1&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; AssemblyCachePath, FrameworkPath;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    2&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] AssemblyNames = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    3&lt;/SPAN&gt;     { &lt;SPAN style="COLOR: maroon"&gt;"MyAssembly"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"MySecondAssembly"&lt;/SPAN&gt; };&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    4&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    5&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; Installer()&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    6&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    7&lt;/SPAN&gt;     FrameworkPath = RuntimeEnvironment.GetRuntimeDirectory();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    8&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;    9&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; MaxPathLength = 1024;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   10&lt;/SPAN&gt;     StringBuilder Buffer = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; StringBuilder(MaxPathLength);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   11&lt;/SPAN&gt;     GetCachePath(ASM_CACHE_FLAGS.ASM_CACHE_ROOT, Buffer, &lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt; MaxPathLength);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   12&lt;/SPAN&gt;     AssemblyCachePath = Buffer.ToString();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   13&lt;/SPAN&gt;     &lt;SPAN style="COLOR: green"&gt;//...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   14&lt;/SPAN&gt; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   15&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   16&lt;/SPAN&gt; [DllImport(&lt;SPAN style="COLOR: maroon"&gt;"fusion.dll"&lt;/SPAN&gt;)]&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   17&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;extern&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; GetCachePath(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   18&lt;/SPAN&gt;     ASM_CACHE_FLAGS dwCacheFlags, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   19&lt;/SPAN&gt;     [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwzCachePath, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   20&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; pcchPath);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   21&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   22&lt;/SPAN&gt; [SecurityPermission(SecurityAction.Demand)]&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   23&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Install(System.Collections.IDictionary stateSaver)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   24&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   25&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;.Install(stateSaver);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   26&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   27&lt;/SPAN&gt;     Assembly ExecutingAssembly = Assembly.GetExecutingAssembly();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   28&lt;/SPAN&gt;     AssemblyName ExecutingAssemblyName = ExecutingAssembly.GetName();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   29&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ExecutingAssemblyFullName = ExecutingAssemblyName.FullName;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   30&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   31&lt;/SPAN&gt;     ProcessStartInfo NGenStartInfo = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; ProcessStartInfo(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   32&lt;/SPAN&gt;         Path.Combine( FrameworkPath, &lt;SPAN style="COLOR: maroon"&gt;"ngen.exe"&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   33&lt;/SPAN&gt;         );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   34&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   35&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   36&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   37&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; index = AssemblyNames.GetUpperBound(0); &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   38&lt;/SPAN&gt;                 index &gt;= AssemblyNames.GetLowerBound(0); index--)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   39&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   40&lt;/SPAN&gt;             &lt;SPAN style="COLOR: green"&gt;// Create Native Image&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   41&lt;/SPAN&gt;             NGenStartInfo.Arguments = String.Format(&lt;SPAN style="COLOR: maroon"&gt;"install \"{0}\""&lt;/SPAN&gt;, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   42&lt;/SPAN&gt;                 ExecutingAssemblyFullName.Replace(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   43&lt;/SPAN&gt;                     ExecutingAssemblyName.Name, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   44&lt;/SPAN&gt;                     AssemblyNames[index]));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   45&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   46&lt;/SPAN&gt;             NGenStartInfo.RedirectStandardOutput = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   47&lt;/SPAN&gt;             NGenStartInfo.UseShellExecute = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   48&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   49&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (Process NGenProcess = Process.Start(NGenStartInfo))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   50&lt;/SPAN&gt;             {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   51&lt;/SPAN&gt;                 NGenProcess.WaitForExit();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   52&lt;/SPAN&gt;                 Context.LogMessage(NGenProcess.StandardOutput.ReadToEnd());&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   53&lt;/SPAN&gt;             }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   54&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   55&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   56&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (Exception ex)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   57&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   58&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; InstallException(ex.Message, ex);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   59&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   60&lt;/SPAN&gt; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   61&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   62&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Commit(System.Collections.IDictionary savedState)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   63&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   64&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;.Commit(savedState);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   65&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   66&lt;/SPAN&gt;     Assembly ExecutingAssembly = Assembly.GetExecutingAssembly();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   67&lt;/SPAN&gt;     AssemblyName ExecutingAssemblyName = ExecutingAssembly.GetName();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   68&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ExecutingAssemblyFullName = ExecutingAssemblyName.FullName;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   69&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   70&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; GacFolder = String.Format(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   71&lt;/SPAN&gt;         &lt;SPAN style="COLOR: maroon"&gt;"{0}\\GAC_{1}\\{2}\\{3}__{4}"&lt;/SPAN&gt;, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   72&lt;/SPAN&gt;         AssemblyCachePath, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   73&lt;/SPAN&gt;         ExecutingAssemblyName.ProcessorArchitecture, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   74&lt;/SPAN&gt;         ExecutingAssemblyName.Name, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   75&lt;/SPAN&gt;         ExecutingAssemblyName.Version, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   76&lt;/SPAN&gt;         ByteArrayToString(ExecutingAssemblyName.GetPublicKeyToken()));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   77&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   78&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; DebugSymbolsPath = Path.GetDirectoryName(ExecutingAssembly.Location);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   79&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   80&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   81&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   82&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; index = AssemblyNames.GetUpperBound(0); &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   83&lt;/SPAN&gt;                 index &gt;= AssemblyNames.GetLowerBound(0); index--)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   84&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   85&lt;/SPAN&gt;             &lt;SPAN style="COLOR: green"&gt;// Copy Debug Symbols to GAC Folder&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   86&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; DebugSymbolsFile = AssemblyNames[index] + &lt;SPAN style="COLOR: maroon"&gt;".pdb"&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   87&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; DestinationFile = Path.Combine(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   88&lt;/SPAN&gt;                 GacFolder.Replace(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   89&lt;/SPAN&gt;                     ExecutingAssemblyName.Name, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   90&lt;/SPAN&gt;                     AssemblyNames[index]), &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   91&lt;/SPAN&gt;                 DebugSymbolsFile);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   92&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   93&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; SourceFile = Path.Combine(DebugSymbolsPath, DebugSymbolsFile);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   94&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (File.Exists(SourceFile))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   95&lt;/SPAN&gt;             {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   96&lt;/SPAN&gt;                 Context.LogMessage(String.Format(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   97&lt;/SPAN&gt;                     &lt;SPAN style="COLOR: maroon"&gt;"Copying {0} to {1}"&lt;/SPAN&gt;, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   98&lt;/SPAN&gt;                     SourceFile, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;   99&lt;/SPAN&gt;                     DestinationFile));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  100&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  101&lt;/SPAN&gt;                 File.Copy(SourceFile, DestinationFile, &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  102&lt;/SPAN&gt;             }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  103&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  104&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  105&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (Exception ex)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  106&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  107&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; InstallException(ex.Message, ex);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  108&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  109&lt;/SPAN&gt; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  110&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  111&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Uninstall(System.Collections.IDictionary savedState)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  112&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  113&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;.Uninstall(savedState);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  114&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  115&lt;/SPAN&gt;     Assembly ExecutingAssembly = Assembly.GetExecutingAssembly();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  116&lt;/SPAN&gt;     AssemblyName ExecutingAssemblyName = ExecutingAssembly.GetName();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  117&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ExecutingAssemblyFullName = ExecutingAssemblyName.FullName;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  118&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  119&lt;/SPAN&gt;     ProcessStartInfo NGenStartInfo = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; ProcessStartInfo(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  120&lt;/SPAN&gt;         Path.Combine( FrameworkPath, &lt;SPAN style="COLOR: maroon"&gt;"ngen.exe"&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  121&lt;/SPAN&gt;         );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  122&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  123&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  124&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  125&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; index = AssemblyNames.GetLowerBound(0); &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  126&lt;/SPAN&gt;                 index &lt;= AssemblyNames.GetUpperBound(0); index++)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  127&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  128&lt;/SPAN&gt;             &lt;SPAN style="COLOR: green"&gt;// Create Native Image&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  129&lt;/SPAN&gt;             NGenStartInfo.Arguments = String.Format(&lt;SPAN style="COLOR: maroon"&gt;"uninstall \"{0}\""&lt;/SPAN&gt;, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  130&lt;/SPAN&gt;                 ExecutingAssemblyFullName.Replace(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  131&lt;/SPAN&gt;                     ExecutingAssemblyName.Name, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  132&lt;/SPAN&gt;                     AssemblyNames[index]));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  133&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  134&lt;/SPAN&gt;             NGenStartInfo.RedirectStandardOutput = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  135&lt;/SPAN&gt;             NGenStartInfo.UseShellExecute = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  136&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  137&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (Process NGenProcess = Process.Start(NGenStartInfo))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  138&lt;/SPAN&gt;             {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  139&lt;/SPAN&gt;                 NGenProcess.WaitForExit();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  140&lt;/SPAN&gt;                 Context.LogMessage(NGenProcess.StandardOutput.ReadToEnd());&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  141&lt;/SPAN&gt;             }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  142&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  143&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  144&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (Exception ex)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  145&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  146&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; InstallException(ex.Message, ex);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  147&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  148&lt;/SPAN&gt; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  149&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  150&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Rollback(System.Collections.IDictionary savedState)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  151&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  152&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;.Rollback(savedState);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  153&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  154&lt;/SPAN&gt;     Assembly ExecutingAssembly = Assembly.GetExecutingAssembly();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  155&lt;/SPAN&gt;     AssemblyName ExecutingAssemblyName = ExecutingAssembly.GetName();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  156&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ExecutingAssemblyFullName = ExecutingAssemblyName.FullName;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  157&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  158&lt;/SPAN&gt;     ProcessStartInfo NGenStartInfo = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; ProcessStartInfo(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  159&lt;/SPAN&gt;         Path.Combine( FrameworkPath, &lt;SPAN style="COLOR: maroon"&gt;"ngen.exe"&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  160&lt;/SPAN&gt;         );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  161&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  162&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  163&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  164&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; index = AssemblyNames.GetUpperBound(0); &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  165&lt;/SPAN&gt;                 index &gt;= AssemblyNames.GetLowerBound(0); index--)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  166&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  167&lt;/SPAN&gt;             &lt;SPAN style="COLOR: green"&gt;// Create Native Image&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  168&lt;/SPAN&gt;             NGenStartInfo.Arguments = String.Format(&lt;SPAN style="COLOR: maroon"&gt;"uninstall \"{0}\""&lt;/SPAN&gt;, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  169&lt;/SPAN&gt;                 ExecutingAssemblyFullName.Replace(&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  170&lt;/SPAN&gt;                     ExecutingAssemblyName.Name, &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  171&lt;/SPAN&gt;                     AssemblyNames[index]));&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  172&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  173&lt;/SPAN&gt;             NGenStartInfo.RedirectStandardOutput = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  174&lt;/SPAN&gt;             NGenStartInfo.UseShellExecute = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  175&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  176&lt;/SPAN&gt;             &lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (Process NGenProcess = Process.Start(NGenStartInfo))&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  177&lt;/SPAN&gt;             {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  178&lt;/SPAN&gt;                 NGenProcess.WaitForExit();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  179&lt;/SPAN&gt;                 Context.LogMessage(NGenProcess.StandardOutput.ReadToEnd());&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  180&lt;/SPAN&gt;             }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  181&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  182&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  183&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (Exception ex)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  184&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  185&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; InstallException(ex.Message, ex);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  186&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  187&lt;/SPAN&gt; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  188&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  189&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; ByteArrayToString(&lt;SPAN style="COLOR: blue"&gt;byte&lt;/SPAN&gt;[] byteArray)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  190&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  191&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (byteArray == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  192&lt;/SPAN&gt;         &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  193&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  194&lt;/SPAN&gt;     StringBuilder buffer = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; StringBuilder(byteArray.Length);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  195&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; index = 0; index &lt; byteArray.Length; index++)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  196&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  197&lt;/SPAN&gt;         buffer.AppendFormat(&lt;SPAN style="COLOR: maroon"&gt;"{0:x2}"&lt;/SPAN&gt;, byteArray[index]);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  198&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  199&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  200&lt;/SPAN&gt;     &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; buffer.ToString();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  201&lt;/SPAN&gt; }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  202&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  203&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;enum&lt;/SPAN&gt; ASM_CACHE_FLAGS&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  204&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  205&lt;/SPAN&gt;     ASM_CACHE_ZAP = 0x01,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  206&lt;/SPAN&gt;     ASM_CACHE_GAC = 0x02,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  207&lt;/SPAN&gt;     ASM_CACHE_DOWNLOAD = 0x04,&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  208&lt;/SPAN&gt;     ASM_CACHE_ROOT = 0x08&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;  209&lt;/SPAN&gt; }&lt;/P&gt;&lt;/DIV&gt;&lt;!--EndFragment--&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=73200"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=73200" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/73200.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/03/23/73200.aspx</guid>
            <pubDate>Fri, 24 Mar 2006 01:37:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/03/23/73200.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/73200.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/73200.aspx</trackback:ping>
        </item>
        <item>
            <title>Filtering .NET 1.1 functionality when using MSBuild and MSBee</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/03/12/72138.aspx</link>
            <description>&lt;P&gt;We try to be good developers and this includes ensuring our warnings are taken care of.  A standard part of our debug builds includes treating warnings as errors.  When we were faced with migrating a project to a split .NET 1.1/2.0 build using MSBee we found it lacked the introduction of a preprocessor directive that would allow us to make the critical decisions in the code.  &lt;/P&gt;
&lt;P&gt;One example where we needed this information had to do with the C# compiler (CSC) in .NET 1.1 lacking assembly signing options.  As a result we had to add back in the AssemblyKeyFile attribute.   When the Treat Warnings as Errors option is enabled this will cause an error in the .NET 2.0 C# Compiler.  To deal with this a little hack of the MSBuildExtras.Fx1_1.CSharp.targets file helped us out.  In the redefinition of the CSC task we modified:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;DefineConstants="$(DefineConstants)"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;to say:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;DefineConstants="FX1_1;$(DefineConstants)"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Now we can define condition statements in our code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;#if FX1_1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;// NOTE: Signed assemblies are not allowed in the ASP.NET application bin directory.&lt;BR&gt;[assembly: AssemblyDelaySign(false)]&lt;BR&gt;[assembly: AssemblyKeyFile("C:\\Keys\\MyKey.snk")]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;#endif&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Hopefully this will make it to the final MSBee release.  &lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=72138"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=72138" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/72138.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/03/12/72138.aspx</guid>
            <pubDate>Sun, 12 Mar 2006 22:49:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/03/12/72138.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/72138.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/72138.aspx</trackback:ping>
        </item>
        <item>
            <title>Suppressing References in Build Output</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/03/12/72124.aspx</link>
            <description>&lt;P&gt;On our build server we don't have any of our dependent applications (e.g. Commerce Server, BizTalk Server) installed because it's cheaper on the licensing and the build server is actually a Virtual Server image running on my dev box where I don't feel like giving up excess resources to build processes. :)  One of the things that has bugged me for a while is the fact that the build process copies referenced assemblies even when Copy Local set to false.  We store all of our references on a network share so everyone is pulling the same version during build.  After a little tinkering I figured out that it doesn't actually write that to the project file.  &lt;/P&gt;
&lt;P&gt;If you want to suppress the referenced assemblies from being copied to the bin folder during build you'll need to edit the project file by hand and add a Private=&amp;#8221;false&amp;#8221;.  For example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;REFERENCE&lt;BR&gt; Name = "MyThirdPartyAssembly"&lt;BR&gt; AssemblyName = "MyThirdPartyAssembly"&lt;BR&gt; HintPath = "R:\ThirdParty\MyThirdPartyAssembly\2.0.2.0\MyThirdPartyAssembly.DLL"&lt;BR&gt; Private = "False"&lt;BR&gt;/&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Up next is trying this with VS2005 to see if we can achieve the same result. :)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;UPDATE&lt;/FONT&gt;&lt;/STRONG&gt;: Works with VS2005 as well!&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;  &lt;ItemGroup&gt;&lt;BR&gt;    &lt;Reference Include="MyThirdPartyAssembly"&gt;&lt;BR&gt;      &lt;Name&gt;MyThirdPartyAssembly&lt;/Name&gt;&lt;BR&gt;      &lt;HintPath&gt;R:\ThirdParty\MyThirdPartyAssembly\1.0.0.0\MyThirdPartyAssembly.dll&lt;/HintPath&gt;&lt;BR&gt;      &lt;Private&gt;false&lt;/Private&gt;&lt;BR&gt;    &lt;/Reference&gt;&lt;BR&gt;    ...&lt;/FONT&gt;&lt;FONT face="Courier New" size=2&gt;&lt;BR&gt;  &lt;/ItemGroup&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=72124"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=72124" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/72124.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/03/12/72124.aspx</guid>
            <pubDate>Sun, 12 Mar 2006 17:15:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/03/12/72124.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/72124.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/72124.aspx</trackback:ping>
        </item>
        <item>
            <title>MSTest using a Test List via Command-Line</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/03/12/72122.aspx</link>
            <description>&lt;P&gt;Converting from NUnit to MSTest I've seem to have hit a little snag.  I can't run MSTest on the command line while focusing on a subset of the tests.  MSTest introduces the concept of Test Lists which allows me to segregate the tests that will run on the build server versus the ones that require a development machine or test environment for smoke testing.  &lt;/P&gt;
&lt;P&gt;It seems when you run the command line with the specified test list:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;mstest /testmetadata:tests.vsmdi /runconfig:localtestrun.testrunconfig /testlist:BuildVerificationTests&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;It finds the tests in the list but it cannot find the test to execute:&lt;/P&gt;
&lt;P&gt;&lt;SPAN id=BugView_lblActual&gt;&lt;FONT face="Courier New" size=2&gt;Microsoft (R) Test Execution Command Line Tool Version 8.0.50727.42&lt;BR&gt;Copyright (C) Microsoft Corporation 2005. All rights reserved.&lt;BR&gt;&lt;BR&gt;Loading tests.vsmdi...&lt;BR&gt;Starting execution...&lt;BR&gt;Test CheckExpectedTypeGoodParameters cannot be found.&lt;BR&gt;No tests to execute.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you're puzzled, so am I.  Feel free to vote for the issue on the &lt;A href="http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?FeedbackId=8e8d4c27-1673-4f50-8b68-9bbf2792b6b9"&gt;MSDN Product Feedback bug&lt;/A&gt; I've filed.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;MSDN Product Feedback Bug: &lt;A href="http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?FeedbackId=8e8d4c27-1673-4f50-8b68-9bbf2792b6b9"&gt;MSTest Command Line Error - Test 'x' cannot be found.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=72122"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=72122" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/72122.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/03/12/72122.aspx</guid>
            <pubDate>Sun, 12 Mar 2006 16:59:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/03/12/72122.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/72122.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/72122.aspx</trackback:ping>
        </item>
        <item>
            <title>MSBuild support for .NET 1.1 targets</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/02/15/69653.aspx</link>
            <description>&lt;P&gt;The MSBuild team just posted &lt;A href="http://blogs.msdn.com/msbuild/archive/2006/02/10/529838.aspx"&gt;beta 1&lt;/A&gt; of the &amp;#8220;MSBee&amp;#8221; toolkit which enables building .NET Framework 1.1 applications with MSBuild.  For those of you moving towards MSBuild and still have a few 1.1 apps lingering this bring the build process under a single tool.&lt;/P&gt;
&lt;P&gt;On a related note I've written a few custom tasks already to generate publisher policy assemblies, use FxCop 1.35b1, Nullsoft Installation System, and the Red-gate SQL Toolkit.  I'm working to get them added to the &lt;A href="http://msbuildtasks.tigris.org"&gt;MSBuild Tasks Community Project&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Source: &lt;A href="http://blogs.msdn.com/msbuild/archive/2006/02/10/529838.aspx"&gt;MSBuild Team Blog - MSBuild Extras - Toolkit for .NET 1.1 (beta 1) is Out! &lt;/A&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=69653"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=69653" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/69653.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/02/15/69653.aspx</guid>
            <pubDate>Thu, 16 Feb 2006 02:40:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/02/15/69653.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/69653.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/69653.aspx</trackback:ping>
        </item>
        <item>
            <title>A More Complete Stack Trace when Debugging Assemblies in the GAC</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/02/06/68405.aspx</link>
            <description>&lt;P&gt;Have you ever had the need to get line numbers from an exception stack trace for an assembly in the GAC?&amp;nbsp; If you work with BizTalk Server the answer is likely yes.&amp;nbsp; To debug Commerce Server pipeline components which I have traditionally&amp;nbsp;put custom C# pipeline components in the GAC and then registered for COM interop.&amp;nbsp; I've found having line numbers indespensible when apps are running in the production test environment. I went searching for the answer and &lt;A href="http://groups.google.ca/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/840fd101c4efd3b9/ee25f929d62cf541?lnk=st&amp;amp;q=GAC+PDB&amp;amp;rnum=8&amp;amp;hl=en#ee25f929d62cf541"&gt;came across it&lt;/A&gt;.&amp;nbsp; I thought I'd write it down here so I remember it.&lt;/P&gt;
&lt;P&gt;To get line numbers with your stack trace:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;When compiling both debug and release builds make sure to generate a program database (aka symbols).&amp;nbsp; 
&lt;UL&gt;
&lt;LI&gt;For release builds you'll want to make sure you use the &lt;A href="http://groups.google.com/group/microsoft.public.windbg/msg/fcf87c9799217d71"&gt;correct switch&lt;/A&gt;, /debug:pdbonly, since /debug:full disables optimization.&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;When you need line numbers place the .pdb file beside your assembly (in the same folder).&amp;nbsp; 
&lt;UL&gt;
&lt;LI&gt;For GAC assemblies you'll need to put it in the assembly folder (e.g. c:\windows\assembly\gac\&lt;ASSEMBLY name&gt;\&lt;VERSION&gt;_&lt;CULTURE blank or&gt;_&lt;PUBLIC token key&gt;) 
&lt;LI&gt;Be aware that the .NET Framework 2.0 is adding &lt;A href="http://blogs.msdn.com/junfeng/archive/2004/09/12/228635.aspx"&gt;platform specific GAC folders&lt;/A&gt; (e.g. GAC, GAC_32, GAC_MSIL, etc...).&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Then you should have line numbers in your stack traces.&amp;nbsp; It's great for debugging and the program databases can be in place for explicit debugging needs and then removed if&amp;nbsp;you don't feel comfortable with them there.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=68405"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=68405" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/68405.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/02/06/68405.aspx</guid>
            <pubDate>Tue, 07 Feb 2006 00:17:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/02/06/68405.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/68405.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/68405.aspx</trackback:ping>
        </item>
        <item>
            <title>Delay Signing defeated!  D'oh!</title>
            <link>http://geekswithblogs.net/colinbo/archive/2006/01/21/66621.aspx</link>
            <description>&lt;P&gt;Development machines here use a delayed signing for building binaries. Only during the build process on the build server does a public/private key pair get used for signing assemblies. When using the unit testing features of Visual Studio 2005 we are prompted to provide a key for re-signing an assembly after instrumentation has been applied. If we provide the public key it will fail. If we provide the public/private key pair it will work.  &lt;/P&gt;
&lt;P&gt;Has anyone else managed to get this working?  Here's what I'm trying to do:&lt;/P&gt;
&lt;P&gt;&lt;SPAN id=BugView_lblReproSteps&gt;1. Create a public/private key pair and extract the public key:&lt;BR&gt;sn -k Private.snk&lt;BR&gt;sn -p Private.snk Public.snk&lt;BR&gt;2. Create a class library project and specify it should delay sign using Public.snk&lt;BR&gt;3. Create a test project and enable Code Coverage.&lt;BR&gt;4. Check the "instrument assemblies in place" option and provide a path to the Public.snk&lt;BR&gt;5. Attempt a test run.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-or-&lt;BR&gt;&lt;BR&gt;From the command prompt:&lt;BR&gt;&lt;BR&gt;&lt;FONT size=2&gt;sn -R bin\Debug\MyAssembly.dll Public.snk&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In turn you'll get the following w&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN id=BugView_lblActual&gt;hen using IDE for code coverage:&lt;BR&gt;&lt;BR&gt;&lt;FONT size=2&gt;Instrumentation warning: &lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Cannot extract the public key from the key file 'C:\Projects\Common\Common\Public.snk': Bad Version of provider. (Exception from HRESULT: 0x80090007)&lt;BR&gt;&lt;/STRONG&gt;Check that the key file is not password protected. Password protected key files are not supported. &lt;FONT color=#a9a9a9&gt;(It's not password protected!)&lt;/FONT&gt;&lt;BR&gt;Code coverage instrumentation warning while processing file Common.dll:&lt;BR&gt;Warning VSP2001 : C:\Projects\MyAssembly\MyAssembly\bin\Debug\MyAssembly.dll is a strongly named assembly. It will need to be re-signed before it can be executed.&lt;BR&gt;Warning VSP2013 : Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this.&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;When using command prompt:&lt;BR&gt;&lt;BR&gt;&lt;FONT size=2&gt;Failed to extract public key from key pair -- Bad Version of provider.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Ah well.  Filed as a bug and will hopefully be fixed.  So much for the joys of delay signing.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;MSDN Product Feedback Center: &lt;A href="http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=2602a0a9-1d5c-497e-8a6c-d7cfb3e95d13"&gt;Bug Details&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=66621"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=66621" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/colinbo/aggbug/66621.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Colin Bowern</dc:creator>
            <guid>http://geekswithblogs.net/colinbo/archive/2006/01/21/66621.aspx</guid>
            <pubDate>Sat, 21 Jan 2006 20:13:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/colinbo/archive/2006/01/21/66621.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/colinbo/comments/commentRss/66621.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/colinbo/services/trackbacks/66621.aspx</trackback:ping>
        </item>
    </channel>
</rss>