<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Jeremy Kuhne's Blog</title><subtitle type="html">Thoughts from a developer on the Expression Suite.  Coding tidbits (Managed C++, C#, interoping with unmanaged code) and just general things related to Expression.</subtitle><id>http://blogs.msdn.com/jeremykuhne/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/jeremykuhne/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2005-08-15T22:38:00Z</updated><entry><title>Creating a SSCLI C# Template for Visual Studio</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/23/creating-a-sscli-c-template-for-visual-studio.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2008/02/23/creating-a-sscli-c-template-for-visual-studio.aspx</id><published>2008-02-23T08:29:00Z</published><updated>2008-02-23T08:29:00Z</updated><content type="html">&lt;P&gt;In my last post (&lt;A class="" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/20/msbuild-your-sscli-c-projects.aspx" mce_href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/20/msbuild-your-sscli-c-projects.aspx"&gt;MSBuild your SSCLI C# projects&lt;/A&gt;) I&amp;nbsp;demonstrated how to create an MSBuild targets file for the SSCLI (Rotor).&amp;nbsp;&amp;nbsp; In this post I'll show you how to make it easier to use Visual Studio to develop SSCLI C# projects.&lt;/P&gt;
&lt;P&gt;To build successfully in VS you need to do a few things, notably:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Override assembly resolution so the SSCLI assemblies are targeted (the &lt;A class="" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/20/msbuild-your-sscli-c-projects.aspx" mce_href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/20/msbuild-your-sscli-c-projects.aspx"&gt;last post&lt;/A&gt; shows you how to do this)&lt;/LI&gt;
&lt;LI&gt;Change the startup action for the project to "Start external program" (in the Debug property page for the project)&lt;/LI&gt;
&lt;LI&gt;Enter&amp;nbsp;the path for clix.exe as the startup program&lt;/LI&gt;
&lt;LI&gt;Put the output binary for you application in as the "Command line arguments"&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;It's a little tedious to set all of this up by hand.&amp;nbsp; Thankfully it ends up it's pretty easy to make a &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/6db0hwky.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/6db0hwky.aspx"&gt;template &lt;/A&gt;to do most of the dirty work.&amp;nbsp;&amp;nbsp;With a small additional change to the targets file it makes it completely painless.&amp;nbsp;&amp;nbsp; (Well, with the one major caveat that you can't debug managed SSCLI code with VS.)&lt;/P&gt;
&lt;P&gt;The existing templates are in the VS folder under "Common7\IDE\ProjectTemplates".&amp;nbsp; Each of the templates are stored in&amp;nbsp;a zip file- perusing a few of these in addition to looking at the &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/6db0hwky.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/6db0hwky.aspx"&gt;documentation&lt;/A&gt; will get you up to speed in no time.&amp;nbsp;&amp;nbsp;As such I'm not going to give a tutorial here, I'm just going to talk briefly about what I did to create my template and share it with you.&lt;/P&gt;
&lt;P&gt;I started with the "CSharp\Windows\1033\ConsoleApplication.zip" because I wanted the equivalent of that for SSCLI.&amp;nbsp; I had to make most&amp;nbsp;of the changes to the&amp;nbsp;.vstemplate file&amp;nbsp;and a few changes to the .csproj file to link in&amp;nbsp;my targets. &amp;nbsp;Here is what my .vstemplate file looks like:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;VSTemplate&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Version&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;"&lt;SPAN style="COLOR: blue"&gt;3.0.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Project&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/developer/vstemplate/2005&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;TemplateData&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;SSCLI Console Application&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Description&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Console Application for the SSCLI (Rotor) Framework&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Description&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Icon&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;SSCLIConsole.ico&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Icon&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;TemplateID&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;SSCLI.CSharp.ConsoleApplication&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;TemplateID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;ProjectType&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;CSharp&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ProjectType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;RequiredFrameworkVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;2.0&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFrameworkVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;MaxFrameworkVersion&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;2.0&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;MaxFrameworkVersion&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;CreateNewFolder&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;true&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;CreateNewFolder&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;DefaultName&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;SSCLIConsoleApplication&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;DefaultName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;ProvideDefaultName&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;true&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ProvideDefaultName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;TemplateData&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;TemplateContent&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;File&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;"&lt;SPAN style="COLOR: blue"&gt;ConsoleApplication.csproj&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ReplaceParameters&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;ProjectItem&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;ReplaceParameters&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;TargetFileName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Properties\AssemblyInfo.cs&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;AssemblyInfo.cs&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ProjectItem&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;ProjectItem&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;ReplaceParameters&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;OpenInEditor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;Program.cs&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ProjectItem&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;TemplateContent&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;VSTemplate&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Not too hard to wrap your head around.&amp;nbsp; In the .csproj I changed the import to &lt;B&gt;&lt;FONT size=2&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Import Project="$(MSBuildToolsPath)\SSCLI.CSharp.targets" /&amp;gt;&lt;/P&gt;&lt;/B&gt;&lt;/FONT&gt;
&lt;P&gt;Zipped up with a custom icon (had to try it) I dumped it in my "Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#" folder, created a few projects off the template to tweak it out and I was almost done.&lt;/P&gt;
&lt;P&gt;The other bit that I've already mentioned was setting the project properties to run "clix".&amp;nbsp; Figuring this bit out isn't&amp;nbsp;too terribly&amp;nbsp;straightforward.&amp;nbsp;&amp;nbsp;VS project settings that &lt;STRONG&gt;don't&lt;/STRONG&gt; go into the .csproj go into&amp;nbsp;a ".csproj.user" file that is created alongside your .csproj whenever you change the defaults.&amp;nbsp; Change the defaults to create said file&amp;nbsp;and you'll quickly discover what you need to set in your .targets file to establish your &lt;STRONG&gt;own&lt;/STRONG&gt; defaults.&amp;nbsp; (Note that these properties are listed in the Microsoft.Build.Commontypes.xsd, found in the MSBuild directory in your relevant framework directory.&amp;nbsp; Also note that it doesn't contain valid values for the VS properties.)&lt;/P&gt;
&lt;P&gt;Here is what I added to SSCLI.CSharp.targets (which should live in your MSBuild directory):&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; VS Specific Properties &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;--&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; Set these so VS runs the host exe &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;--&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;StartAction&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;Program&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;StartAction&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;StartProgram&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;$(SSCLI_FrameworkPath)\clix.exe&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;StartProgram&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;StartArguments&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;$(TargetFileName)&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;StartArguments&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt; Might as well turn this on as it is currently the only kind of debugging you can do in VS &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;--&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; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;EnableUnmanagedDebugging&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;true&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EnableUnmanagedDebugging&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: #a31515; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;That's pretty much it.&amp;nbsp; Now you can relatively easily create SSCLI projects.&amp;nbsp;&amp;nbsp; You don't get managed debugging, as mentioned.&amp;nbsp; You &lt;STRONG&gt;do&lt;/STRONG&gt; get the rest of the development enviroment benefits however (intellisense, etc.).&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;The complete &lt;A class="" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504"&gt;SSCLI.CSharp.targets&lt;/A&gt; file can be found &lt;A class="" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504"&gt;here&lt;/A&gt;.&amp;nbsp; The template can be found &lt;A class="" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=505" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=505"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7855077" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="C#" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/C_2300_/default.aspx" /><category term="Tools" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Tools/default.aspx" /><category term=".NET" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/.NET/default.aspx" /><category term="SSCLI" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/SSCLI/default.aspx" /><category term="Rotor" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Rotor/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Visual+Studio/default.aspx" /><category term="MSBuild" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/MSBuild/default.aspx" /></entry><entry><title>MSBuild your SSCLI C# projects</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/20/msbuild-your-sscli-c-projects.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2008/02/20/msbuild-your-sscli-c-projects.aspx</id><published>2008-02-20T09:21:00Z</published><updated>2008-02-20T09:21:00Z</updated><content type="html">&lt;P&gt;[&amp;nbsp;Edit 22 Feb 2008:&amp;nbsp;The complete &lt;A class="" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504"&gt;SSCLI.CSharp.targets&lt;/A&gt; file can be found &lt;A class="" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ssclimsbuild&amp;amp;ReleaseId=504"&gt;here&lt;/A&gt;.&amp;nbsp;]&lt;/P&gt;
&lt;P&gt;In my last post I&amp;nbsp;got SSCLI compiling with the&amp;nbsp;2008 C++ compiler&amp;nbsp;(&lt;A class="" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/19/sscli-2-0-and-visual-studio-2008.aspx" target=_blank mce_href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/19/sscli-2-0-and-visual-studio-2008.aspx"&gt;SSCLI 2.0 and Visual Studio 2008&lt;/A&gt;).&amp;nbsp; (A side note: since&amp;nbsp;it is clearly possible to build SSCLI with the compiler there is no reason you&amp;nbsp;shouldn't be able to&amp;nbsp;get a VS Solution up and running that would build the SSCLI- just a &lt;STRONG&gt;lot&lt;/STRONG&gt; of work.)&amp;nbsp; Having done that I thought it would be interesting to see how plausible actually working in VS with SSCLI projects would be.&lt;/P&gt;
&lt;P&gt;As a first step, it ends up that there is relatively little you have to do to get a&amp;nbsp;.csproj that will work with&amp;nbsp;SSCLI through MSBuild.&amp;nbsp; The key items are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Set the Csc.exe path.&lt;/LI&gt;
&lt;LI&gt;Make sure the TargetFrameworkDirectory gets set to the SSCLI output directory.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The way to figure this&amp;nbsp;out is to work backwards from the compiler (csc.exe).&amp;nbsp; Look at what csc's arguments are and look for where arguments get generated for&amp;nbsp;it in the build targets.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Microsoft.CSharp.targets is the file to start looking in.&amp;nbsp;&amp;nbsp;It is included at the end of a .csproj so this is a pretty logical place to start looking.&amp;nbsp; Thankfully the file is short, so it is relatively easy to digest.&amp;nbsp; (The target files are in the Windows\Microsoft.Net\Framework\v0.0 directories.&amp;nbsp; I used 3.5 for this article- the last set of MSBuild targets before this version are in 2.0.50727.)&lt;/P&gt;
&lt;P&gt;The &amp;lt;Csc&amp;gt; task in Microsoft.CSharp.Targets has a "ToolPath" argument that takes $(CscToolPath).&amp;nbsp; There is #1!&amp;nbsp; Finding #2 begins with "References" which is set to @(ReferencePath).&amp;nbsp; You won't find&amp;nbsp;much in Microsoft.CSharp.Targets so you need to look to the included Microsoft.Common.Targets.&lt;/P&gt;
&lt;P&gt;You can figure out #2 by looking at the generation of @(ReferencePaths).&amp;nbsp; Doing a search will drop you in the ResolveAssemblyReferences target- it's in the comments as an [OUT] -- bingo.&amp;nbsp;&amp;nbsp;In&amp;nbsp;a csproj referenced .NET assemblies are listed under (logically)&amp;nbsp;&amp;lt;Reference&amp;gt; items.&amp;nbsp; These&amp;nbsp;are listed here as an [IN] in the comments - see the connection?&amp;nbsp; (Note: the quick way to look for usage of items is to search for '@(ItemName' -- don't use the closing parenthesis as you'll miss transforms.)&lt;/P&gt;
&lt;P&gt;In&amp;nbsp;this target&amp;nbsp;the simple "System" &amp;lt;Reference&amp;gt; is turned into a full @(ReferencePaths) item.&amp;nbsp; If you look at the &amp;lt;ResolveAssemblyReference&amp;gt; task within this target you'll see some promising parameters-- the most promising being SearchPaths="$(AssemblySearchPaths)".&amp;nbsp;&amp;nbsp; Look for the source of&amp;nbsp;$(AsemblySearchPaths) and you'll find a nice detailed comment&amp;nbsp; at the top of Common.Targets:&lt;/P&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&amp;lt;!--&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The SearchPaths property is set to find assemblies in the following order:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(1) Files from current project - indicated by {CandidateAssemblyFiles}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(2) $(ReferencePath) - the reference path property, which comes from the .USER file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(3) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(4) The directory of MSBuild's "target" runtime from GetFrameworkPath.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;The "target" runtime folder is the folder of the runtime that MSBuild is a part of.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(5) Registered assembly folders, indicated by {Registry:*,*,*}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(6) Legacy registered assembly folders, indicated by {AssemblyFolders}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(7) Look in the application's output folder (like bin\debug)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(8) Resolve to the GAC.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(9) Treat the reference's Include as if it were a real file name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;--&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;AssemblySearchPaths&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;Condition&lt;/SPAN&gt;=" '$(AssemblySearchPaths)' == '' "&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{CandidateAssemblyFiles};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$(ReferencePath);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{HintPathFromItem};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{TargetFrameworkDirectory};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{AssemblyFolders};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{GAC};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{RawFileName};&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;$(OutDir)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;AssemblySearchPaths&lt;/SPAN&gt;&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;{TargetFrameworkDirectory} is key here.&amp;nbsp; If you search for "TargetFrameworkDirectory" you'll find&amp;nbsp;the property shows up in the GetFrameworkPaths and GetReferenceAssemblyPaths&amp;nbsp;targets.&amp;nbsp; It is the one we want. &amp;nbsp;It gets replaced by $(TargetFrameworkDirectory) inside of the &amp;lt;ResolveAssemblyReference&amp;gt; task.&amp;nbsp; You can see this if you use Reflector to look at the task-- but you can probably make that leap without digging further.&lt;/P&gt;
&lt;P&gt;That gives us everything we need.&amp;nbsp; We know where all of our framework (SSCLI) assemblies are so we just need to override Common.targets' path building completely for this and inject our overrides into the regular targets.&amp;nbsp; You can do this by creating a &lt;STRONG&gt;new&lt;/STRONG&gt; target file that includes the Microsoft.CSharp.targets and use this new file &lt;STRONG&gt;instead&lt;/STRONG&gt; in your .csproj.&amp;nbsp;&amp;nbsp; Here's the answer:&lt;/P&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Project&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;InitialTargets&lt;/SPAN&gt;="SSCLI_InitialChecks" &lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;SPAN style="COLOR: green"&gt; Put this first as this file contains overrides for the standard targets &lt;/SPAN&gt;--&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Import&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;Project&lt;/SPAN&gt;="Microsoft.CSharp.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;PropertyGroup&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;SPAN style="COLOR: green"&gt; Assuming x86 debug build of the framework &lt;/SPAN&gt;--&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;SSCLI_FrameworkPath&lt;/SPAN&gt;&amp;gt;$(ROTOR_DIR)\binaries.x86chk.rotor&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;SSCLI_FrameworkPath&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;CscToolPath&lt;/SPAN&gt;&amp;gt;$(SSCLI_FrameworkPath)&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;CscToolPath&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;TargetFrameworkDirectory&lt;/SPAN&gt;&amp;gt;$(SSCLI_FrameworkPath)&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;TargetFrameworkDirectory&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;SPAN style="COLOR: green"&gt; This one isn't supported by the sscli csc.exe &lt;/SPAN&gt;--&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;ErrorReport&lt;/SPAN&gt;&amp;gt;&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;ErrorReport&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;PropertyGroup&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Target&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;="SSCLI_InitialChecks"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Condition&lt;/SPAN&gt;=" '$(ROTOR_DIR)' == '' "&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;="ROTOR_DIR is not set.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Please set an environment variable or property to the SSCLI directory.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Note that running 'env' in your SSCLI directory will set this."/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Condition&lt;/SPAN&gt;="!Exists('$(SSCLI_FrameworkPath)')"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;="SSCLI not found at expected path: '$(SSCLI_FrameworkPath)'&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Please build SSCLI if necessary." /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;Target&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Override Microsoft.Common.targets GetFrameworkPaths&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;--&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Target&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;="GetFrameworkPaths"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DependsOnTargets&lt;/SPAN&gt;="$(GetFrameworkPathsDependsOn)" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;!--&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Override Microsoft.Common.targets GetFrameworkPaths&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: green; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;--&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #a31515"&gt;Target&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;="GetReferenceAssemblyPaths"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DependsOnTargets&lt;/SPAN&gt;="$(GetReferenceAssemblyPathsDependsOn)" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;&lt;FONT face=Consolas&gt;&amp;lt;/&lt;SPAN style="COLOR: #a31515"&gt;Project&lt;/SPAN&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Dump&amp;nbsp;the xml above into a file (say, called "SSCLI.CSharp.targets"), drop it&amp;nbsp;in the same directory as the other target files, and (as already stated) include this file in your csproj instead of Microsoft.CSharp.targets.&lt;/P&gt;
&lt;P&gt;Now you can 'msbuild myNiftySscliApp.csproj'.&amp;nbsp;&amp;nbsp; And &lt;STRONG&gt;yes, &lt;/STRONG&gt;you can even open said csproj in Visual Studio and do some developin'.&amp;nbsp; (With the sad lack of managed debugging, but, hey-- you get Intellisense and all of the other goodies of the IDE.)&amp;nbsp; In my next posts I'll show you how to grease the wheels as much as you can with the IDE, starting with how to build and run easily, then moving on to making an SSCLI project template.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7812639" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="C#" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/C_2300_/default.aspx" /><category term="Tools" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Tools/default.aspx" /><category term=".NET" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/.NET/default.aspx" /><category term="SSCLI" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/SSCLI/default.aspx" /><category term="Rotor" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Rotor/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Visual+Studio/default.aspx" /><category term="MSBuild" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/MSBuild/default.aspx" /></entry><entry><title>SSCLI 2.0 and Visual Studio 2008</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/19/sscli-2-0-and-visual-studio-2008.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2008/02/19/sscli-2-0-and-visual-studio-2008.aspx</id><published>2008-02-19T12:30:00Z</published><updated>2008-02-19T12:30:00Z</updated><content type="html">&lt;P&gt;The currently available&amp;nbsp;SSCLI 2.0 (Rotor) does not build successfully with Visual Studio 2008.&amp;nbsp;&amp;nbsp; I've managed to make it build and I thought I'd share my changes.&amp;nbsp;&amp;nbsp; Be very aware:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I haven't done anything resembling thorough testing on these changes&lt;/LI&gt;
&lt;LI&gt;I made the changes so that it would build for me on my 32bit Vista machine&lt;/LI&gt;
&lt;LI&gt;I avoided changing source files, and focused on build files&lt;/LI&gt;
&lt;LI&gt;The warnings I disabled are pretty tame, see #3&lt;/LI&gt;
&lt;LI&gt;I tried to keep the changes to a minimum&lt;/LI&gt;
&lt;LI&gt;I know next to nothing about NMAKE&lt;/LI&gt;
&lt;LI&gt;I have no idea&amp;nbsp;about any&amp;nbsp;MS plans&amp;nbsp;regarding SSCLI and VS2008&lt;/LI&gt;
&lt;LI&gt;This is does not constitute official support for building SSCLI in VS2008&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\mswin32.startup.pl&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;change the if block that begins at line 41:&lt;/LI&gt;&lt;/OL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;if (my $msvcdir = Get("MSVCDir")) {&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;# These are the INCLUDE paths used during the primary bootstrap.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;my $winsdkdir = Get("ROTOR_WINSDKDIR");&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Set("SDK_INC_PATH_BOOT", catdir ($winsdkdir, "include"));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Set("CRT_INC_PATH_BOOT", catdir ($msvcdir, "Include"));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Set("SDK_LIB_PATH", catdir ($winsdkdir, "lib"));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Set("CRT_LIB_PATH", catdir ($msvcdir, "lib"));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Set("VC_BIN_PATH", catdir ($msvcdir, "bin"));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;\sscli20\win.env.bat&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;change &lt;EM&gt;%VS80COMNTOOLS%&lt;/EM&gt; on line 37 to &lt;EM&gt;%VS&lt;STRONG&gt;90&lt;/STRONG&gt;COMNTOOLS%&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;after line 42, insert the following:&lt;/LI&gt;&lt;/OL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;REM Set the SDK path&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;if "%ROTOR_WINSDKDIR%"=="" set ROTOR_WINSDKDIR=%WindowsSdkDir%&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;if "%ROTOR_WINSDKDIR%"=="" set ROTOR_WINSDKDIR=%MSVCDIR%\PlatformSDK&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;call :ShortName "%ROTOR_WINSDKDIR%"&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;set ROTOR_WINSDKDIR=%RESULT%&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\clr\src\classlibnative\nls\wks\sources; &lt;/STRONG&gt;&lt;STRONG&gt;\sscli20\clr\src\debug\daccess\wks\sources; \sscli20\clr\src\vm\dacwks\sources; \sscli\clr\src\classlibnative\float\wks\sources; \sscli\clr\src\dlls\mscordac\wks\sources; \sscli\clr\src\vm\wks1\sources; \sscli\clr\src\vm\wks2\sources; \sscli\clr\src\vm\wks3\sources; \sscli\clr\src\vm\wks4\sources&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Kill line 16 (&lt;EM&gt;MSC_WARNING_LEVEL =-Wp64&lt;/EM&gt;)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli\clr\src\classlibnative\float\sources.inc&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Kill line 21 (&lt;EM&gt;COMPILER_WARNINGS =/W4)&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\clr\src\toolbox\sos\strike\sources&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Kill line 18 (&lt;EM&gt;MSC_WARNING_LEVEL =/W4&lt;/EM&gt;)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\env\bin\devdiv.def&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change line 334 to &lt;EM&gt;SUBSYSTEM_WINVER = ,&lt;STRONG&gt;5.00&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;Change line 338 to &lt;EM&gt;SUBSYSTEM_CONVER = ,&lt;STRONG&gt;5.00&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\pal\inc\vs9.h (NEW FILE)&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;// Patch up the conflicting defines to allow building with VS9&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef MAKEWORD&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef MAKELONG&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef LOWORD&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef HIWORD&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef LOBYTE&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef HIBYTE&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_IP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_ICMP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_IGMP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_GGP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_TCP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_PUP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_UDP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_IDP&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_ND&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef IPPROTO_RAW&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef INADDR_ANY&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef INADDR_BROADCAST&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#undef INADDR_NONE&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#pragma warning (disable :4985)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;224&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;240&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#ifdef _WIN64&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;IMAGE_SIZEOF_NT_OPTIONAL64_HEADER&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#else&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;IMAGE_SIZEOF_NT_OPTIONAL32_HEADER&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#endif&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;\sscli20\pal\win32\win32pal.h&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add &lt;EM&gt;#include &amp;lt;Vs9.h&amp;gt;&lt;/EM&gt;&amp;nbsp;after line 1272 (before the&amp;nbsp;windows includes)&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\tools\binplace\sources; \sscli\clr\src\tools\ildbdump\sources&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change line 27 &lt;EM&gt;SUBSYSTEM_VERSION=4.00&lt;/EM&gt; to &lt;EM&gt;SUBSYSTEM_VERSION=&lt;STRONG&gt;5.00&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\tools\resourcecompiler\sources&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change line&amp;nbsp;31 &lt;EM&gt;SUBSYSTEM_VERSION=4.00&lt;/EM&gt; to &lt;EM&gt;SUBSYSTEM_VERSION=&lt;STRONG&gt;5.00&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\tools\cppmunge\sources&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change line&amp;nbsp;24 &lt;EM&gt;SUBSYSTEM_VERSION=4.00&lt;/EM&gt; to &lt;EM&gt;SUBSYSTEM_VERSION=&lt;STRONG&gt;5.00&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\tools\build\sources&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change line&amp;nbsp;48 &lt;EM&gt;SUBSYSTEM_VERSION=4.00&lt;/EM&gt; to &lt;EM&gt;SUBSYSTEM_VERSION=&lt;STRONG&gt;5.00&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\pal\win32\make.cmd&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Kill the &lt;EM&gt;if not "%ROTOR_TOOLSET_VERSION%"&lt;/EM&gt;&amp;nbsp;block from line 43-46&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\clr\src\vm\sources.inc&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add &lt;EM&gt;-wd4800&lt;/EM&gt; to the end of line 22&lt;/LI&gt;
&lt;LI&gt;Delete lines 23-25&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\ssclie20\clr\src\classlibnative\nls\sources.inc&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add &lt;EM&gt;-wd4800&lt;/EM&gt; to the end of line 20&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\csharp\sccomp\sources.inc&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Kill lines 52-54 (&lt;EM&gt;USER_C_FLAGS&lt;/EM&gt;)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;\sscli20\pal\win32\rotor_pal.src&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Replace line 57 (&lt;EM&gt;#if _MSC_VER == 1400&lt;/EM&gt;) with:&lt;/LI&gt;&lt;/OL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#if _MSC_VER == 1500&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;#define _MSVCRT MSVCR90D&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;#elif _MSC_VER == 1400&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;b.&amp;nbsp; Replace line 67 (&lt;EM&gt;#if _MSC_VER == 1400&lt;/EM&gt;) with:&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=CodeCxSpFirst style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;#if _MSC_VER == 1500&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpMiddle style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;#define _MSVCRT MSVCR90&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=CodeCxSpLast style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;#elif _MSC_VER == 1400&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Well there you have it.&amp;nbsp; Hopefully I didn't miss any of my changes or make too many typos.&amp;nbsp; I ran through&amp;nbsp;these instructions on a clean install of SSCLI and was able to successfully build per the docs and compile and run HelloWorld.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7787554" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="SSCLI" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/SSCLI/default.aspx" /><category term="Rotor" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Rotor/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Visual+Studio/default.aspx" /></entry><entry><title>Tools for Digging Deeper Into .NET</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/18/tools-for-digging-deeper-into-net.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2008/02/18/tools-for-digging-deeper-into-net.aspx</id><published>2008-02-18T06:02:00Z</published><updated>2008-02-18T06:02:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;As I’ve been preparing more things to talk about I realized that it would be beneficial to have a list of tools to refer back to in my posts.&amp;nbsp; So here you go--a list of tools I find essential to development in .NET.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The most important tool is Lutz Roeder’s &lt;STRONG&gt;.NET Reflector&lt;/STRONG&gt; (&lt;/FONT&gt;&lt;A href="http://www.aisto.com/roeder/dotnet/" mce_href="http://www.aisto.com/roeder/dotnet/"&gt;&lt;FONT face=Calibri size=3&gt;http://www.aisto.com/roeder/dotnet/&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This powerful tool makes analyzing .NET assemblies easy.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you aren’t using this already you need to start yesterday.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Some of the &lt;STRONG&gt;.NET sources&lt;/STRONG&gt; have been released and as such you can now directly debug into .NET. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;You do need VS 2008 (non-express) for this to work. &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx" mce_href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx"&gt;&lt;FONT face=Calibri size=3&gt;http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The &lt;STRONG&gt;Shared Source Common Language Infrastructure&lt;/STRONG&gt; (SSCLI) is your friend.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can learn an awful lot about the internals of the CLR by looking at this shared source version. &lt;/FONT&gt;&lt;A href="http://research.microsoft.com/sscli/" mce_href="http://research.microsoft.com/sscli/"&gt;&lt;FONT face=Calibri size=3&gt;http://research.microsoft.com/sscli/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;If you’re running up against a wall debugging in VS, &lt;STRONG&gt;WinDbg&lt;/STRONG&gt; can come to your rescue.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The Debugging Tools for Windows install quickly and are extremely powerful. &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/whdc/devtools/debugging/default.mspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;STRONG&gt;SOS (Son of Strike)&lt;/STRONG&gt; is a .NET debugging extension that is usable in both VS and WinDbg.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This comes with the Framework so you’re already good to go.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;However, there is a cool extension to the extension available (SOSEX):&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx" mce_href="http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx"&gt;&lt;FONT face=Calibri size=3&gt;http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;STRONG&gt;Process Explorer&lt;/STRONG&gt; isn’t specifically .NET related, but it is an essential tool for figuring out what the heck has file/directory X open. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Use it to replace Task Manager and find happiness again. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" mce_href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;&lt;FONT face=Calibri size=3&gt;http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;STRONG&gt;.NET Profiler&lt;/STRONG&gt; lets you take a look at the pressure your application is putting on the managed heap.&amp;nbsp; It can be downloaded here: &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&amp;amp;DisplayLang=en&lt;/A&gt;&amp;nbsp; Details on usage can be found here: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms979205.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms979205.aspx&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7764203" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="Tools" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Tools/default.aspx" /><category term="Debugging" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Debugging/default.aspx" /><category term=".NET" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/.NET/default.aspx" /></entry><entry><title>Where I've Been</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2008/02/18/where-i-ve-been.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2008/02/18/where-i-ve-been.aspx</id><published>2008-02-18T04:03:00Z</published><updated>2008-02-18T04:03:00Z</updated><content type="html">&lt;P&gt;It has been a long time since I've posted here.&lt;/P&gt;
&lt;P&gt;For the past couple years I've been moving around the Expression team.&amp;nbsp; For the first version of Expression Studio I pulled together the setup and the internal build system.&amp;nbsp; Getting up to speed on MSBuild, localization, code signing, MS Installer technology, WiX, and more than a few other things kept me pretty buried up through the V1 release.&lt;/P&gt;
&lt;P&gt;Post V1 I've moved toward feature development on Blend.&amp;nbsp; I've been primarily working on the project system.&lt;/P&gt;
&lt;P&gt;Now that I've gotten my feet planted in the Blend codebase&amp;nbsp;I hope to start being a little more active here&amp;nbsp;in the&amp;nbsp;near future.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7762191" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="Blend" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Blend/default.aspx" /></entry><entry><title>Using /clr and __declspec(thread)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2006/04/19/578670.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2006/04/19/578670.aspx</id><published>2006-04-19T03:40:00Z</published><updated>2006-04-19T03:40:00Z</updated><content type="html">&lt;P&gt;Sorry I haven't been writing much lately, but a lot has been going on in Expression land.&amp;nbsp; I've switched over to working on build and setup development so you can expect to see the flavor of my posts change somewhat.&lt;/P&gt;
&lt;P&gt;Here's a frustrating bit I ran into playing around with C++/CLI:&amp;nbsp; __declspec(thread) isn't supported by the CLR.&amp;nbsp; You &lt;EM&gt;may&lt;/EM&gt; get the application to compile properly, but you'll get the following error when trying to run:&lt;/P&gt;
&lt;P&gt;"The application failed to initialize properly (0xc000007b)."&lt;/P&gt;
&lt;P&gt;You can still use thread locals, but you're stuck managing the TLS_ apis yourself.&amp;nbsp; I'm including a simple template as one suggestion on how to do this:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;template&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &amp;lt;&lt;SPAN style="COLOR: blue"&gt;typename&lt;/SPAN&gt; T&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; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; ThreadLocal&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;DWORD threadLocalIndex;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ThreadLocal(ThreadLocal &lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt;&amp;amp;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;T *GetPointer(&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static_cast&lt;/SPAN&gt;&amp;lt;T*&amp;gt;(::TlsGetValue(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;threadLocalIndex));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; SetPointer(T *value)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;::TlsSetValue(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;threadLocalIndex, &lt;SPAN style="COLOR: blue"&gt;static_cast&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt;*&amp;gt;(value));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; SetValue(&lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; T &amp;amp;value)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;T* currentPointer = &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;GetPointer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (currentPointer == NULL)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;SetPointer(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; T(value));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*currentPointer = value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;T &amp;amp;GetValue(&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;T* currentPointer = &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;GetPointer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (currentPointer == NULL)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;SetPointer(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; T());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; *&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;GetPointer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; DeleteValue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;T* currentPointer = &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;GetPointer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (currentPointer != NULL)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;delete&lt;/SPAN&gt; currentPointer;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;SetPointer(NULL);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ThreadLocal(&lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; T&amp;amp; value)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;threadLocalIndex = ::TlsAlloc();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;SetValue(value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ThreadLocal()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;-&amp;gt;threadLocalIndex = ::TlsAlloc();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;virtual&lt;/SPAN&gt; ~ThreadLocal()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;DeleteValue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;::TlsFree(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;-&amp;gt;threadLocalIndex);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&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: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;};&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above template can replace a __declspec(thread) variable fairly easily.&amp;nbsp; It will handle allocating and deallocating for you.&amp;nbsp; Simple&amp;nbsp;example:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;static __declspec(thread) int threadMeaning=42;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;... becomes ..&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;static ThreadLocal&amp;lt;int&amp;gt; threadMeaning(42);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;Using the ThreadLocal is done through SetValue() and GetValue()&amp;nbsp; ie- threadMeaning.SetValue(2001).&lt;/P&gt;
&lt;P dir=ltr&gt;The example doesn't have error checking and I haven't done anything terribly fancy. You really should try and use the framework for your thread locals if you can.&amp;nbsp; If you can't,&amp;nbsp;hopefully this will be of use.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=578670" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="Managed C++" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Managed+C_2B002B00_/default.aspx" /><category term="General Coding" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/General+Coding/default.aspx" /></entry><entry><title>Enabling Remote Desktop remotely</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2006/04/13/576125.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2006/04/13/576125.aspx</id><published>2006-04-14T01:17:00Z</published><updated>2006-04-14T01:17:00Z</updated><content type="html">&lt;P&gt;Ran into a situation where I needed to get remote desktop access to a machine where I hadn't previously enabled it.&amp;nbsp; I'm not the first to post about this, but the other posts I've &lt;A href="/tonyschr/archive/2004/04/19/116245.aspx"&gt;seen &lt;/A&gt;didn't have information on opening the firewall (XP SP2).&amp;nbsp; Here's one solution:&lt;/P&gt;
&lt;PRE&gt;reg add "//&lt;EM&gt;machinename&lt;/EM&gt;/HKLM/SYSTEM/CurrentControlSet/Control/Terminal Server" /f /v fDenyTSConnections /t REG_DWORD /d 0

reg add "//&lt;EM&gt;machinename&lt;/EM&gt;/HKLM/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/DomainProfile/GloballyOpenPorts/List" /f /v 3389:TCP /t REG_SZ /d 3389:TCP:*:Enabled:@xpsp2res.dll,-22009

reg add "//&lt;EM&gt;machinename&lt;/EM&gt;/HKLM/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/StandardProfile/GloballyOpenPorts/List" /f /v 3389:TCP /t REG_SZ /d 3389:TCP:*:Enabled:@xpsp2res.dll,-22009
&lt;/PRE&gt;
&lt;P&gt;You have to be an administrator, of course. You can reboot the machine by typing &lt;PRE&gt;shutdown -m \\&lt;EM&gt;machinename&lt;/EM&gt; -r -f&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=576125" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author></entry><entry><title>Interop with Office</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2006/01/25/517249.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2006/01/25/517249.aspx</id><published>2006-01-25T06:15:00Z</published><updated>2006-01-25T06:15:00Z</updated><content type="html">&lt;P&gt;Before I dive in, I've put together a &lt;a href="http://blogs.msdn.com/expression/archive/2006/01/24/517157.aspx"&gt;simple doc&lt;/A&gt; showing how you can liven up the clip art in Office using Graphic Designer that you might find of interest.&lt;/P&gt;
&lt;P&gt;The other "feature" that was included in the current CTP of Expression Graphic Designer (EGD)&amp;nbsp;is better interop with Office apps.&amp;nbsp; EGD now has vastly better support for importing WMF/EMF files and clipboard data.&amp;nbsp; In addition, if you want to pull out the original source image for a graphic in Office you can do so through the "Office Image" selection in the Paste Special menu item.&lt;/P&gt;
&lt;P&gt;These were both done by me a few months ago as&amp;nbsp;I grew frustrated with trying to get content back and forth between Office.&amp;nbsp; There is a lot of strangeness that occurs that makes the experience less than stellar.&amp;nbsp; To help shed some light on the situation I'll run through exactly what happens in the rest of this post.&lt;/P&gt;
&lt;P&gt;When you copy from EGD a BMP, PNG, GIF, and JPG are put on the clipboard at the current resolution of the document.&amp;nbsp; PNG is particularly useful with Office applications as it supports transparency.&amp;nbsp; The first strangeness is that if you paste into Office you get a different default paste depending on the application you are in.&amp;nbsp; In the case of Word you do &lt;STRONG&gt;not&lt;/STRONG&gt; get PNG by default and as such you must paste special to get the PNG.&amp;nbsp; In PowerPoint, however, you &lt;STRONG&gt;do&lt;/STRONG&gt; get the PNG by default.&lt;/P&gt;
&lt;P&gt;Where things get particularly ugly is when you copy &lt;STRONG&gt;out&lt;/STRONG&gt; of Office.&amp;nbsp; Office will always render graphics at your screen resolution (typically 96dpi).&amp;nbsp; For me, at least, this usually ends up looking horrible.&amp;nbsp; A great example is taking a screenshot out of a PowerPoint presentation.&lt;/P&gt;
&lt;P&gt;To get the original image out of Office you hit the second strangeness...&amp;nbsp; In Word it isn't possible (afaik).&amp;nbsp; If you want to get the image out you must first copy from Word and then into PowerPoint where you &lt;STRONG&gt;can&lt;/STRONG&gt; save the original.&amp;nbsp; (There are more differences with the other Office apps.&amp;nbsp; I'll only detail Word/PowerPoint here for now.)&amp;nbsp; In PowerPoint if you right click on a graphic and select "Save As Picture".&amp;nbsp; Depending on the source you may get a drop-down arrow on the "Save" button that will let you "Save Original Picture".&lt;/P&gt;
&lt;P&gt;Since Office obviously keeps the original PNG I thought it would be much better to grab that if it were at all possible, which fortunately it is.&amp;nbsp; If you copy an image out of Office you will get the new paste special selection of "Office Image" as previously described.&amp;nbsp; The image will be inserted as an image object that will be sized the same as the object in Office with the full DPI of the backing image.&amp;nbsp; (Rotation is something we might support later.&amp;nbsp; Some other special features such as drop shadows might be added if there is enough interest.)&lt;/P&gt;
&lt;P&gt;If you take things back into Office again you'll rasterize at the doc DPI as stated earlier.&amp;nbsp; It is best, of course, to keep XPR files around for any content you send to Office.&lt;/P&gt;
&lt;P&gt;Office drawings (AutoShapes, WordArt, etc.) are&amp;nbsp;put on the clipboard as EMF, so you're best off pasting special in EGD as&amp;nbsp;this format.&amp;nbsp; (Same goes with WMF/EMF clipart.)&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(This brings up an interesting little side effect that you can take advantage of in Office.&amp;nbsp; If you copy an Office object that normally doesn't antialias&amp;nbsp;such as a chart you can get antialiasing by making a few in-app conversions.&amp;nbsp;&amp;nbsp;Take a chart, copy,&amp;nbsp;and then paste as EMF back into the Office app.&amp;nbsp; After pasting as EMF right click and select "Edit Picture".&amp;nbsp; You now have an antialiased copy of the original!)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I intend to make the experience a little more transparent in the future if at all possible.&amp;nbsp; I'll be looking for any and all feedback on what would make life easier for you.&amp;nbsp; In addition, if you have any WMF/EMF content that you can't get into EGD, please let me know and I'll take a look.&amp;nbsp; A metafile is simply a collection of Win32 drawing commands, which makes it pretty broad in theory.&amp;nbsp; In practice, however, not many calls are supported by apps that output metafiles.&amp;nbsp; Your input will help me prioritize.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=517249" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="All Things Acrylic" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/All+Things+Acrylic/default.aspx" /></entry><entry><title>New versions of Expression Graphic Designer and Interactive Designer available!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2006/01/24/517043.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2006/01/24/517043.aspx</id><published>2006-01-24T23:07:00Z</published><updated>2006-01-24T23:07:00Z</updated><content type="html">&lt;P&gt;Our January 2006 CTPs are available!&amp;nbsp;&amp;nbsp;&lt;A href="http://www.microsoft.com/products/expression/en/default.mspx"&gt;http://www.microsoft.com/products/expression/en/default.mspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;What's new??&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;We've got official names now.&amp;nbsp; (Acrylic =&amp;gt; Graphic Designer; Sparkle =&amp;gt; Interactive Designer)&lt;/LI&gt;
&lt;LI&gt;Interactive Designer is publicly available for the first time!&lt;/LI&gt;
&lt;LI&gt;Exporting to XAML from Graphic Designer (EGD)&amp;nbsp;has been &lt;STRONG&gt;greatly&lt;/STRONG&gt; improved.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The XAML exporter is the only real new feature for this CTP for EGD.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[There is, however, something important buried in there&amp;nbsp;if you do any sort of interop with Office apps.&amp;nbsp; I'll post about it later today, so keep an eye out. ;)]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=517043" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="All Things Acrylic" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/All+Things+Acrylic/default.aspx" /></entry><entry><title>New version of Acrylic available for download!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2005/10/17/481698.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2005/10/17/481698.aspx</id><published>2005-10-17T06:35:00Z</published><updated>2005-10-17T06:35:00Z</updated><content type="html">&lt;P&gt;I encourage you to take a look.&amp;nbsp; We've done a lot to tighten things up since the last release.&amp;nbsp; We're still hard at work, so any and all feedback is greatly appreciated.&amp;nbsp; (Links to the newsgroup can be found on the site.)&amp;nbsp; &lt;A href="http://www.microsoft.com/expression"&gt;http://www.microsoft.com/expression&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=481698" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="All Things Acrylic" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/All+Things+Acrylic/default.aspx" /></entry><entry><title>Expression on Channel9</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2005/09/14/466410.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2005/09/14/466410.aspx</id><published>2005-09-14T22:42:00Z</published><updated>2005-09-14T22:42:00Z</updated><content type="html">&lt;P&gt;A nice video that will give you a bit of what's going on with Expression.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=115387"&gt;http://channel9.msdn.com/Showpost.aspx?postid=115387&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=466410" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="All Things Acrylic" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/All+Things+Acrylic/default.aspx" /></entry><entry><title>How suite it is: Expression!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2005/09/14/how-suite-it-is-expression.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2005/09/14/how-suite-it-is-expression.aspx</id><published>2005-09-14T19:44:00Z</published><updated>2005-09-14T19:44:00Z</updated><content type="html">&lt;P&gt;&lt;A href="http://www.microsoft.com/expression" mce_href="http://www.microsoft.com/expression"&gt;http://www.microsoft.com/expression&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;It's a great relief to finally have this out in the open.&amp;nbsp; There's a suite on the way, folks, and we're working hard every day to pack as much cool functionality in as we can for you.&lt;/P&gt;
&lt;P&gt;Take a look at the web site, download the Acrylic preview!&amp;nbsp; We're eager for feedback!&lt;/P&gt;
&lt;P&gt;[Modified 2/17/2008: removed dead picture link]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=466208" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="All Things Acrylic" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/All+Things+Acrylic/default.aspx" /></entry><entry><title>Looking at double buffering and the new BufferedGraphics classes</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2005/09/08/462344.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2005/09/08/462344.aspx</id><published>2005-09-08T09:59:00Z</published><updated>2005-09-08T09:59:00Z</updated><content type="html">&lt;P&gt;I started spending some time looking at double buffering with Windows Forms a little while back and noticed that in the 2.0 framework there are a couple of new BufferedGraphics classes.&amp;nbsp; I toyed around with them a bit and got them to work, but didn’t &lt;EM&gt;really&lt;/EM&gt; understand what was going on.&amp;nbsp; Looking into things again the past few days I found the available material somewhat lacking, so I did some investigation using &lt;A href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/A&gt; and thought I’d share what I’ve found.&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;[What is double buffering?&amp;nbsp; It’s drawing on an off-screen bitmap then copying it onto the display to help avoid redraw flickering issues.]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Double buffering will be handled automatically for you if the &lt;STRONG&gt;OptimizedDoubleBuffer&lt;/STRONG&gt; style is set to true through &lt;FONT face="Courier New"&gt;SetStyle()&lt;/FONT&gt;.&amp;nbsp;&amp;nbsp; MSDN: &lt;A href="http://msdn2.microsoft.com/library/b367a457(en-us,vs.80).aspx"&gt;Double Buffered Graphics&lt;/A&gt;.&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;[Double buffering&amp;nbsp;will also be done if the &lt;STRONG&gt;DoubleBuffer&lt;/STRONG&gt;, &lt;STRONG&gt;UserPaint&lt;/STRONG&gt;, and &lt;STRONG&gt;AllPaintingInWmPaint&lt;/STRONG&gt; styles are &lt;EM&gt;all&lt;/EM&gt; set to true.&amp;nbsp; Setting the DoubleBuffered property to true is another way to set the OptimizedDoubleBuffer style to true (as well as AllPaintingInWmPaint, but oddly it doesn’t turn off AllPaintingInWmPaint when set to false).&amp;nbsp; As of Beta2 the documentation says that DoubleBuffer style is obsolete, but it is still checked in the code.&amp;nbsp; (I’ve seen mention that double buffering is on by default in the 2.0 framework, but I haven’t seen this to be true in Beta2.)]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you wish to manually manage double buffering you can do so using the new BufferedGraphics classes.&amp;nbsp;&amp;nbsp; MSDN: &lt;A href="http://msdn2.microsoft.com/library/tdk2485d(en-us,vs.80).aspx"&gt;How to: Manually Manage Buffered Graphics&lt;/A&gt;.&amp;nbsp; There are three key classes that you need to be familiar with:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/library/hwac9f5b(en-us,vs.80).aspx"&gt;BufferedGraphics&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/library/tt8yksdk(en-us,vs.80).aspx"&gt;BufferedGraphicsContext&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/library/k176f1xt(en-us,vs.80).aspx"&gt;BufferedGraphicsManager&lt;/A&gt;.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;These classes are what Windows Forms uses to double buffer if the appropriate styles are set.&amp;nbsp; Let’s take a in-depth look at each in turn:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;&lt;U&gt;BufferedGraphicsManager&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;System.Drawing.BufferedGraphicsManager&lt;/FONT&gt; is a pretty simple class that has a static constructor that creates a &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; instance that you can obtain through the &lt;FONT face="Courier New"&gt;Current&lt;/FONT&gt; property.&amp;nbsp; It also registers itself with the &lt;FONT face="Courier New"&gt;ProcessExit&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;DomainUnload&lt;/FONT&gt; events so that it can call &lt;FONT face="Courier New"&gt;Invalidate()&lt;/FONT&gt; on the created &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; as the app shuts down.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT face=Arial&gt;BufferedGraphicsContext&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; class handles allocating and releasing the off-screen bitmap that you draw to (which you access through the &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; class it gives back to you).&amp;nbsp; You can get an app-wide instance of this class from the &lt;FONT face="Courier New"&gt;BufferedGraphicsManager.Current&lt;/FONT&gt; property.&amp;nbsp; You can also manually create a &lt;FONT face="Courier New" color=#000000&gt;BufferedGraphicsContext&lt;/FONT&gt; class, but then you are responsible for calling &lt;FONT face="Courier New"&gt;Dispose()&lt;/FONT&gt; when you are finished with it to release created resources.&amp;nbsp; Note that disposing of a context class will delete its &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object if it has one active. (An alternative to calling &lt;FONT face="Courier New"&gt;Dispose&lt;/FONT&gt; is calling &lt;FONT face="Courier New"&gt;Invalidate(),&lt;/FONT&gt; which will call &lt;FONT face="Courier New"&gt;Dispose()&lt;/FONT&gt; when you dispose of the &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object created through the context.)&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Calling &lt;FONT face="Courier New"&gt;Allocate()&lt;/FONT&gt; from a &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; will create a compatible &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; object / Display Device Context (DC) that wraps an off-screen bitmap for the specified &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; object / DC.&amp;nbsp; This new &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; object is accessed through the &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; property of the &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object.&amp;nbsp; [Win32 Fyi:&amp;nbsp; The bitmap is created using &lt;FONT face="Courier New"&gt;CreateDIBSection&lt;/FONT&gt;.&amp;nbsp; &lt;FONT face="Courier New"&gt;hSection&lt;/FONT&gt; is set to &lt;FONT face="Courier New"&gt;NULL&lt;/FONT&gt; which allows the system to allocate the memory for the bitmap, which is then deallocated when the class later calls&amp;nbsp;&lt;FONT face="Courier New"&gt;DeleteObject&lt;/FONT&gt; on the bitmap handle.]&lt;/P&gt;
&lt;P&gt;Setting the &lt;FONT face="Courier New"&gt;MaximumBuffer&lt;/FONT&gt; property sets the threshold for&amp;nbsp;the bitmap size that is kept in memory after disposing of a &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object.&amp;nbsp; If the size requested is larger than the &lt;FONT face="Courier New"&gt;MaximumBuffer&lt;/FONT&gt; size a &lt;EM&gt;new&lt;/EM&gt; temporary &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; is created that will automatically be disposed of when the &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object it returns is disposed.&amp;nbsp; (Note that if the context has already created a &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object that has &lt;EM&gt;not&lt;/EM&gt; been disposed a temporary &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; will also be created.)&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;&lt;U&gt;BufferedGraphics&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This is the object that provides you access to the off-screen bitmap that a &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; class creates (through &lt;FONT face="Courier New"&gt;Allocate()&lt;/FONT&gt;).&amp;nbsp; You can draw to the &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; object returned from the &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; property just like you normally would.&amp;nbsp; When you’re finished drawing, calling &lt;FONT face="Courier New"&gt;Render()&lt;/FONT&gt; on the &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object will call the Win32 &lt;FONT face="Courier New"&gt;BitBlt&lt;/FONT&gt; function using the &lt;FONT face="Courier New"&gt;SRCCOPY&lt;/FONT&gt; ROP method (just copies), positioning the bitmap based off of the &lt;FONT face="Courier New"&gt;Position&lt;/FONT&gt; property of the&amp;nbsp;rectangle passed to the &lt;FONT face="Courier New"&gt;Allocate()&lt;/FONT&gt; method when creating this &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; object.&amp;nbsp;&amp;nbsp; By default this copies to the &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; object / DC specified in the &lt;FONT face="Courier New"&gt;Allocate()&lt;/FONT&gt; method, but you can specify any &lt;FONT face="Courier New"&gt;Graphics&lt;/FONT&gt; object / DC as a destination through the &lt;FONT face="Courier New"&gt;Render()&lt;/FONT&gt; overloads.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT face=Arial&gt;The Windows Forms WM_PAINT&amp;nbsp; Handler&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I’ve included some (very) pseudo-code here to help give you an idea of what happens when a Windows Forms control handles the &lt;FONT face="Courier New"&gt;WM_PAINT&lt;/FONT&gt; message from Windows.&amp;nbsp; This is important to look at to understand how the different styles will affect the painting process.&amp;nbsp; (Note that there are also calls to &lt;FONT face="Courier New"&gt;BeginPaint/EndPaint&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;SelectPalette&lt;/FONT&gt;.&amp;nbsp; The &lt;FONT face="Courier New"&gt;HDC&lt;/FONT&gt; is also set up.)&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;if (OptimizedDoubleBuffer || (DoubleBuffer &amp;amp;&amp;amp; UserPaint &amp;amp;&amp;amp; AllPaintingInWmPaint))&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;create a BufferedGraphics from the context returned from the BufferedGraphicsManager&lt;BR&gt;&amp;nbsp;set the clipping rectangle&lt;BR&gt;&amp;nbsp;save the Graphics state&lt;BR&gt;&amp;nbsp;call &lt;STRONG&gt;OnPaintBackground&lt;/STRONG&gt;&amp;nbsp; (which calls &lt;STRONG&gt;PaintBackground&lt;/STRONG&gt;())&amp;nbsp; if not &lt;STRONG&gt;Opaque&lt;/STRONG&gt; style&lt;BR&gt;&amp;nbsp;restore the Graphics state&lt;BR&gt;&amp;nbsp;call &lt;STRONG&gt;OnPaint&lt;/STRONG&gt; which then raises the &lt;STRONG&gt;Paint&lt;/STRONG&gt; event&lt;BR&gt;&amp;nbsp;render the BufferedGraphics object&lt;BR&gt;}&lt;BR&gt;else&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;if (AllPaintingInWmPaint) call OnPaintBackground delegates if not Opaque style // unless an HDC is passed in WPARAM, not sure when this will happen&lt;BR&gt;&amp;nbsp;call OnPaint which then raises the Paint event&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Two crucial things:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Don't turn on double buffering if you're handling it yourself. If you have double buffering turned on and you're attempting handle your own double buffering of it you'll end up copying your back buffer into another back buffer that is then copied to the screen.&lt;/LI&gt;
&lt;LI&gt;The other interesting note here is that &lt;FONT face="Courier New"&gt;WM_ERASEBACKBROUND&lt;/FONT&gt; message handler checks for the the &lt;STRONG&gt;&lt;FONT face="Courier New"&gt;AllPaintingInWmPaint&lt;/FONT&gt;&lt;/STRONG&gt; style.&amp;nbsp; You still get the background painted for you in the &lt;FONT face="Courier New"&gt;WM_PAINT&lt;/FONT&gt; handler if you don't have the &lt;STRONG&gt;&lt;FONT face="Courier New"&gt;Opaque&lt;/FONT&gt;&lt;/STRONG&gt; style set.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;&lt;U&gt;Key Takeaways:&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Don’t bother with the &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; classes if you want simple double buffering.&amp;nbsp; Set the &lt;FONT face="Courier New"&gt;DoubleBuffered&lt;/FONT&gt; property to true.&lt;/LI&gt;
&lt;LI&gt;If you want to handle your own double buffering:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Set the &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;DoubleBuffered&lt;/STRONG&gt;&lt;/FONT&gt; property and the &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;DoubleBuffer&lt;/STRONG&gt;&lt;/FONT&gt; style to &lt;STRONG&gt;&lt;FONT face="Courier New" color=#000000&gt;false&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;Override &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;OnPaint()&lt;/STRONG&gt;&lt;/FONT&gt;. Don’t call the base unless you deliberately want the &lt;FONT face="Courier New"&gt;Paint&lt;/FONT&gt; event raised.&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;If you are handling the background yourself set the &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;AllPaintingInWmPaint&lt;/STRONG&gt;&lt;/FONT&gt; and the &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;Opaque&lt;/STRONG&gt;&lt;/FONT&gt; styles.&lt;/LI&gt;
&lt;LI&gt;If you want to minimize allocations of bitmaps:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Ensure you have created your &lt;EM&gt;own&lt;/EM&gt; separate &lt;FONT face="Courier New" color=#000000&gt;&lt;STRONG&gt;BufferedGraphicsContext&lt;/STRONG&gt;&lt;/FONT&gt; classes for each &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;BufferedGraphics&lt;/STRONG&gt;&lt;/FONT&gt; you intend to use.&lt;/LI&gt;
&lt;LI&gt;Ensure your &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;MaximumBuffer&lt;/STRONG&gt;&lt;/FONT&gt; property is large enough to hold the size of the off-screen bitmap.&lt;/LI&gt;
&lt;LI&gt;Always call &lt;STRONG&gt;&lt;FONT face="Courier New"&gt;Dispose()&lt;/FONT&gt;&lt;/STRONG&gt; on a &lt;FONT face="Courier New"&gt;BufferedGraphics&lt;/FONT&gt; class when you're done drawing.&amp;nbsp; (Specifically, before you call &lt;FONT face="Courier New" color=#000000&gt;Allocate&lt;/FONT&gt; again on it's hosting &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt;.)&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Call &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;Dispose()&lt;/STRONG&gt;&lt;/FONT&gt; on any &lt;FONT face="Courier New"&gt;BufferedGraphicsContext&lt;/FONT&gt; class you create yourself when you're finished with them.&lt;/LI&gt;
&lt;LI&gt;Remember the limitations:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;You can’t change where the back buffer is copied to after allocating. (The offset in the target DC, that is.)&lt;/LI&gt;
&lt;LI&gt;You can’t specify the raster operation (ROP).&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's about it for now.&amp;nbsp; This ended up being much more detailed than I expected and I've gotten a bit drowsy so hopefully this came through somewhat clear.&amp;nbsp; Any comments/corrections are welcome.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462344" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="Managed C++" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Managed+C_2B002B00_/default.aspx" /><category term="General Coding" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/General+Coding/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Setting up C++ Interop (with Win32) in VS 2005.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2005/09/08/462259.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2005/09/08/462259.aspx</id><published>2005-09-08T03:17:00Z</published><updated>2005-09-08T03:17:00Z</updated><content type="html">&lt;P&gt;I've already given the steps necessary to make this happen in an earlier &lt;a href="http://blogs.msdn.com/jeremykuhne/archive/2005/06/11/428363.aspx"&gt;post&lt;/A&gt;, but as this will come up so much I decided to pull it into a seperate post with more explicit details.&amp;nbsp; The basic things you need again are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/library/k8d11d4s(en-us,vs.80).aspx"&gt;/clr &lt;/A&gt;option set for the project.&amp;nbsp; (Common Language Runtime support property under General.) 
&lt;LI&gt;Include the appropriate Win32 headers.&amp;nbsp; &lt;FONT size=2&gt;(&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;#include&lt;/FONT&gt; &amp;lt;windows.h&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt; is the main one) 
&lt;LI&gt;Appropriate target OS #defines. (see &lt;A href="http://msdn.microsoft.com/library/en-us/winprog/winprog/using_the_windows_headers.asp"&gt;&lt;FONT color=#003399&gt;Using the Windows Headers&lt;/FONT&gt;&lt;/A&gt; for the right values) 
&lt;LI&gt;If the project was started from one of the CLR templates, you'll need to remove $(NoInherit) from the Additional Dependencies property under Linker:Input.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;As mentioned in the earlier post, it's probably a good idea to put the Win32 #includes in a precompiled header for speedier compilation&amp;nbsp;(stdafx.h typically, see &lt;A href="http://msdn.microsoft.com/library/en-us/vccore/html/_core_creating_precompiled_header_files.asp"&gt;&lt;FONT color=#003399&gt;Creating Precompiled Header Files&lt;/FONT&gt;&lt;/A&gt; for more info).&amp;nbsp; Here is what this looks like (for the latest versions):&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;PRE&gt;&lt;FONT color=#006400&gt;//
// Target platform defines:
//&lt;/FONT&gt;

&lt;FONT color=#0000ff&gt;#ifndef&lt;/FONT&gt; WINVER
&lt;FONT color=#0000ff&gt;#define&lt;/FONT&gt; WINVER 0x0501
&lt;FONT color=#0000ff&gt;#endif&lt;/FONT&gt;

&lt;FONT color=#0000ff&gt;#ifndef&lt;/FONT&gt; _WIN32_WINNT
&lt;FONT color=#0000ff&gt;#define&lt;/FONT&gt; _WIN32_WINNT 0x0501
&lt;FONT color=#0000ff&gt;#endif&lt;/FONT&gt;

&lt;FONT color=#0000ff&gt;#ifndef&lt;/FONT&gt; _WIN32_WINDOWS
&lt;FONT color=#0000ff&gt;#define&lt;/FONT&gt; _WIN32_WINDOWS 0x0410
&lt;FONT color=#0000ff&gt;#endif&lt;/FONT&gt;

&lt;FONT color=#0000ff&gt;#ifndef&lt;/FONT&gt; _WIN32_IE
&lt;FONT color=#0000ff&gt;#define&lt;/FONT&gt; _WIN32_IE 0x0500
&lt;FONT color=#0000ff&gt;#endif&lt;/FONT&gt;

&lt;FONT color=#006400&gt;// Disable warning for XML comments.&lt;/FONT&gt;
&lt;FONT color=#0000ff&gt;#pragma&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;warning&lt;/FONT&gt;( &lt;FONT color=#0000ff&gt;disable&lt;/FONT&gt; : 4634 )

&lt;FONT color=#006400&gt;// Windows Header Files:
&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;#include&lt;/FONT&gt; &lt;FONT color=#a52a2a&gt;&amp;lt;windows.h&amp;gt;&lt;/FONT&gt;

&lt;FONT color=#0000ff&gt;#pragma warning&lt;/FONT&gt;( &lt;FONT color=#0000ff&gt;default&lt;/FONT&gt; : 4634 )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ok, but what about the warning disable?&amp;nbsp; In Beta 2, turning on XML comments would cause parsing of all included headers as well.&amp;nbsp; Not really what you want given there are a number of places XML delimiters inadvertently show up&amp;nbsp;(they aren't actual XML comments, so you are likely to get errors).&amp;nbsp; My last word was that in the final code includes that have the &lt;FONT face="Courier New" size=2&gt;&lt;STRONG&gt;#include &amp;lt;header.h&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; (as opposed to the &lt;FONT face="Courier New" size=2&gt;&lt;STRONG&gt;#include "header.h"&lt;/STRONG&gt;)&lt;/FONT&gt; format will not be parsed to make this easier.&lt;/P&gt;
&lt;P&gt;So... step-by-step:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create or load a project.&lt;/LI&gt;
&lt;LI&gt;Set the /clr switch.&lt;/LI&gt;
&lt;LI&gt;Ensure the dependencies property isn't set to $(NoInherit).&lt;/LI&gt;
&lt;LI&gt;Add the relevant Win32 #defines and #includes if needed (see above).&lt;/LI&gt;
&lt;LI&gt;Code. (See my other articles [&lt;a href="http://blogs.msdn.com/jeremykuhne/archive/2005/06/11/428363.aspx"&gt;1&lt;/A&gt;], [&lt;a href="http://blogs.msdn.com/jeremykuhne/archive/2005/06/12/428417.aspx"&gt;2&lt;/A&gt;] for more details.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;That's basically it.&amp;nbsp; Some other useful links from MSDN:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/library/ms173265(en-us,vs.80).aspx"&gt;How To: Migrate to /clr&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/library/ms173266(en-us,vs.80).aspx"&gt;Initialization of Mixed Assemblies &lt;/A&gt;(if you have a DLL with a DllMain, look at this)&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462259" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="Managed C++" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/Managed+C_2B002B00_/default.aspx" /><category term="General Coding" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/General+Coding/default.aspx" /></entry><entry><title>New Version of Acrylic Available!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jeremykuhne/archive/2005/08/15/new-version-of-acrylic-available.aspx" /><id>http://blogs.msdn.com/jeremykuhne/archive/2005/08/15/new-version-of-acrylic-available.aspx</id><published>2005-08-16T00:38:00Z</published><updated>2005-08-16T00:38:00Z</updated><content type="html">&lt;P&gt;I'm happy to report that the August 2005 Community Technology Preview is live on &lt;A href="http://www.microsoft.com/products/expression" mce_href="http://www.microsoft.com/products/expression"&gt;http://www.microsoft.com/products/expression&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;There are a number of videos and feature details at &lt;A href="http://www.microsoft.com/products/expression/features.aspx" mce_href="http://www.microsoft.com/products/expression/features.aspx"&gt;http://www.microsoft.com/products/expression/features.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Have fun!&lt;/P&gt;
&lt;P&gt;[Edited 2/17/2008:&amp;nbsp; Removed dead picture link.]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=451907" width="1" height="1"&gt;</content><author><name>jkuhne</name><uri>http://blogs.msdn.com/members/jkuhne.aspx</uri></author><category term="All Things Acrylic" scheme="http://blogs.msdn.com/jeremykuhne/archive/tags/All+Things+Acrylic/default.aspx" /></entry></feed>