<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Park Place</title><link>http://blogs.msdn.com/djpark/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Organize Usings Across Your Entire Solution</title><link>http://blogs.msdn.com/djpark/archive/2008/08/16/organize-usings-across-your-entire-solution.aspx</link><pubDate>Sat, 16 Aug 2008 05:55:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8871230</guid><dc:creator>djpark</dc:creator><slash:comments>22</slash:comments><comments>http://blogs.msdn.com/djpark/comments/8871230.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=8871230</wfw:commentRss><description>&lt;p&gt;One of the features I worked on for the Visual Studio 2008 release was the new &amp;quot;Organize Usings&amp;quot; feature.&amp;#160; This feature allows you to:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Remove Unused Usings - Determines which using directives are not used in the current file and deletes them.&amp;#160;&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;Sort Usings - Sorts the using directives in a file &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;We've received a great response from customers on the usefulness of this feature but one of the questions that I've received quite often is - &amp;quot;is there a way to make the feature work on an entire project or solution&amp;quot;?&amp;#160; The current answer to this is no.&amp;#160; Given the number of times I've heard the request though, I thought it would be worth posting a workaround that uses macros.&amp;#160; &lt;/p&gt;  &lt;p&gt;So here's what you need to do - it's really quite simple:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 1: &lt;/strong&gt;Create a new macro in Visual Studio through the Tools | Macros menu.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2: &lt;/strong&gt;Paste the code below into the Module and save it&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note that the code below is courtesy of Kevin Pilch-Bisson (&lt;/em&gt;&lt;a title="http://blogs.msdn.com/kevinpilchbisson/archive/2004/05/17/133371.aspx" href="http://blogs.msdn.com/kevinpilchbisson/archive/2004/05/17/133371.aspx"&gt;&lt;em&gt;http://blogs.msdn.com/kevinpilchbisson/archive/2004/05/17/133371.aspx&lt;/em&gt;&lt;/a&gt;&lt;em&gt;) and Chris Eargle (&lt;/em&gt;&lt;a title="http://www.chriseargle.com/post/Format-Solution.aspx" href="http://www.chriseargle.com/post/Format-Solution.aspx"&gt;&lt;em&gt;http://www.chriseargle.com/post/Format-Solution.aspx&lt;/em&gt;&lt;/a&gt;&lt;em&gt;), who have posted macros that allow you to format across an entire solution.&amp;#160; I'm simply re-applying their approach to invoke the RemoveAndSort command rather than the FormatDocument command.&amp;#160; Note that I haven't tested this macro extensively so please use at your own risk.&amp;#160; &lt;/em&gt;&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Module&lt;/span&gt; Module1&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; OrganizeSolution()&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; sol &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Solution = DTE.Solution&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; i &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Integer&lt;/span&gt; = 1 &lt;span style="color: #0000ff"&gt;To&lt;/span&gt; sol.Projects.Count&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            OrganizeProject(sol.Projects.Item(i))&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;Private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; OrganizeProject(&lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; proj &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Project)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; i &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Integer&lt;/span&gt; = 1 &lt;span style="color: #0000ff"&gt;To&lt;/span&gt; proj.ProjectItems.Count&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            OrganizeProjectItem(proj.ProjectItems.Item(i))&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;Private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; OrganizeProjectItem(&lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; projectItem &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; ProjectItem)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; fileIsOpen &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Boolean&lt;/span&gt; = &lt;span style="color: #0000ff"&gt;False&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; projectItem.Kind = Constants.vsProjectItemKindPhysicalFile &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;            &lt;span style="color: #008000"&gt;'If this is a c# file &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; projectItem.Name.LastIndexOf(&lt;span style="color: #006080"&gt;&amp;quot;.cs&amp;quot;&lt;/span&gt;) = projectItem.Name.Length - 3 &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;                &lt;span style="color: #008000"&gt;'Set flag to true if file is already open &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;                fileIsOpen = projectItem.IsOpen&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;                &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; window &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Window = projectItem.Open(Constants.vsViewKindCode)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;                window.Activate()&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;                projectItem.Document.DTE.ExecuteCommand(&lt;span style="color: #006080"&gt;&amp;quot;Edit.RemoveAndSort&amp;quot;&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;                &lt;span style="color: #008000"&gt;'Only close the file if it was not already open &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;                &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Not&lt;/span&gt; fileIsOpen &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;                    window.Close(vsSaveChanges.vsSaveChangesYes)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;                &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #008000"&gt;'Be sure to apply RemoveAndSort on all of the ProjectItems. &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Not&lt;/span&gt; projectItem.ProjectItems &lt;span style="color: #0000ff"&gt;Is&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; i &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Integer&lt;/span&gt; = 1 &lt;span style="color: #0000ff"&gt;To&lt;/span&gt; projectItem.ProjectItems.Count&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;                OrganizeProjectItem(projectItem.ProjectItems.Item(i))&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #008000"&gt;'Apply RemoveAndSort on a SubProject if it exists. &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Not&lt;/span&gt; projectItem.SubProject &lt;span style="color: #0000ff"&gt;Is&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            OrganizeProject(projectItem.SubProject)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Module&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Step 3: &lt;/strong&gt;Run the macro on any solution that you'd like and there you have it!&amp;#160; Enjoy :)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8871230" width="1" height="1"&gt;</description></item><item><title>XML to Schema wizard for C#</title><link>http://blogs.msdn.com/djpark/archive/2008/01/13/xml-to-schema-wizard-for-c.aspx</link><pubDate>Sun, 13 Jan 2008 07:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7095684</guid><dc:creator>djpark</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/djpark/comments/7095684.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=7095684</wfw:commentRss><description>&lt;P&gt;I had a conversation recently where I discovered that a new "XML to Schema" template was going to be added to the default set of Item Templates shipped with Visual Basic in Visual Studio 2008 SP1.&amp;nbsp; This template is designed to kick off a wizard that generates an XML Schema (.xsd) file from an XML source and inserts it into your project.&amp;nbsp; For VB users, this is incredibly useful since the VB IDE uses these schema files to populate their IntelliSense lists for XML literals.&amp;nbsp; And of course, there's the added benefit of having a tool that can automate XML schema generation.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;You can check out this template at: &lt;A href="http://msdn2.microsoft.com/en-us/vbasic/bb840042.aspx" mce_href="http://msdn2.microsoft.com/en-us/vbasic/bb840042.aspx"&gt;http://msdn2.microsoft.com/en-us/vbasic/bb840042.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This conversation got me wondering two things:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Whether or not it would be worthwhile to add a C# version of this template to Visual Studio&lt;/LI&gt;
&lt;LI&gt;What other templates should be added/removed to Visual Studio?&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;On the first point, since C# doesn't support XML literals directly in the language like Visual Basic does, the value C# users would get from having this extra template seems to be much less relative to that of VB users.&amp;nbsp; Of course, this doesn't necessarily mean that it wouldn't be useful for C# users.&amp;nbsp; Given this, it would be great to hear any thoughts you have on adding this template as a default template for C#.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;On the second point, since we're in the early stages of planning for our next release, it would be great to get any feedback on templates that you feel are either missing or are useless so that we can plan accordingly.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7095684" width="1" height="1"&gt;</description></item><item><title>Public Hotfix: VS 2005 SP1 unresponsive when typing in an XML doc comment</title><link>http://blogs.msdn.com/djpark/archive/2007/11/29/public-hotfix-vs-2005-sp1-unresponsive-when-typing-in-an-xml-doc-comment.aspx</link><pubDate>Thu, 29 Nov 2007 09:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6593148</guid><dc:creator>djpark</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/djpark/comments/6593148.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=6593148</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;For those of you that are using Visual Studio 2005 SP1, you may have run into an issue where typing certain constructs in an XML doc comment (i.e. &amp;lt;![CDATA[]]&amp;gt; or &amp;lt;!----&amp;gt;) would cause&amp;nbsp;the IDE to become unresponsive.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Below is an example&amp;nbsp;scenario where this behavior can be observed:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp; Open Visual Studio 2005 SP1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;Create a new C# class library project&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;Type ‘///’ before the class definition to auto-generate the XML documentation comment&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;Add a &amp;lt;![CDATA[]]&amp;gt; section in the XML documentation comment&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;Try adding characters such as ‘&amp;lt;’ in between 'CDATA[' and ']' &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;The IDE will become unresponsive&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;o:p&gt;To address this issue, we've released a public hotfix that you can download at: &lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;A href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=9646" mce_href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=9646"&gt;&lt;FONT color=#0000ff&gt;https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=9646&lt;/FONT&gt;&lt;/A&gt;.&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;o:p&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;o:p&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;I hope this helps!&amp;nbsp; Please let me know if you have any questions or comments.&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6593148" width="1" height="1"&gt;</description></item><item><title>How to use solutions and projects between Visual Studio 2005 and 2008</title><link>http://blogs.msdn.com/djpark/archive/2007/11/07/how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx</link><pubDate>Wed, 07 Nov 2007 09:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5951924</guid><dc:creator>djpark</dc:creator><slash:comments>35</slash:comments><comments>http://blogs.msdn.com/djpark/comments/5951924.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=5951924</wfw:commentRss><description>&lt;P&gt;In this blog post, I’ll explain the possibilities and limitations of using solutions and projects between Visual Studio 2005 and 2008.&amp;nbsp; Read on!&lt;/P&gt;
&lt;P&gt;The upcoming release of Visual Studio 2008 introduces a great new feature called ”.NET Framework Multi-targeting” that allows you to target multiple versions of the .NET framework using Visual Studio 2008. (Check out &lt;A href="http://blogs.msdn.com/lukeh/archive/2007/06/29/net-framework-multitargeting-in-visual-studio-2008-aka-orcas.aspx" mce_href="http://blogs.msdn.com/lukeh/archive/2007/06/29/net-framework-multitargeting-in-visual-studio-2008-aka-orcas.aspx"&gt;Luke Hoban’s blog&lt;/A&gt; and &lt;A href="http://weblogs.asp.net/scottgu/archive/2007/06/20/vs-2008-multi-targeting-support.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2007/06/20/vs-2008-multi-targeting-support.aspx"&gt;Scott Guthrie’s blog&lt;/A&gt; for additional information)&amp;nbsp; Multi-targeting opens up a new world of possibilities, in addition to its fair share of questions.&amp;nbsp; One particular question that we’ve been hearing often over the past few months is: &lt;I&gt;“How can I work with solutions and projects between Visual Studio 2005 and Visual Studio 2008?”&lt;/I&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The short answer to this question is:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Solutions created in Visual Studio 2008 &lt;B&gt;&lt;U&gt;cannot&lt;/U&gt; &lt;/B&gt;be opened in Visual Studio 2005 &lt;/LI&gt;
&lt;LI&gt;Projects created in Visual Studio 2008 &lt;B&gt;&lt;U&gt;can&lt;/U&gt;&lt;/B&gt; be opened in Visual Studio 2005 &lt;/LI&gt;
&lt;LI&gt;Solutions and projects created in Visual Studio 2005 &lt;B&gt;&lt;U&gt;can&lt;/U&gt;&lt;/B&gt; be opened in Visual Studio 2008 &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;As with all things, there are some subtle details with these statements that I’d like to take some time to explore with you.&amp;nbsp; &lt;/P&gt;
&lt;H2&gt;Solutions created in VS2008 cannot be opened in VS2005&lt;/H2&gt;
&lt;P&gt;As you work with multi-targeting, you or your team may have a need to share solutions between Visual Studio 2005 and Visual Studio 2008.&amp;nbsp; One common scenario would be opening a solution created in Visual Studio 2008 and targeting .NET Framework 2.0 in Visual Studio 2005.&amp;nbsp; You’ll find that opening this solution in Visual Studio 2005 will give you the following error dialog.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/djpark/WindowsLiveWriter/Test_12A81/clip_image001_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/djpark/WindowsLiveWriter/Test_12A81/clip_image001_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=99 alt=clip_image001 src="http://blogs.msdn.com/blogfiles/djpark/WindowsLiveWriter/Test_12A81/clip_image001_thumb.jpg" width=504 border=0 mce_src="http://blogs.msdn.com/blogfiles/djpark/WindowsLiveWriter/Test_12A81/clip_image001_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Diagram 1: Error message when opening VS2008 solution in VS2005&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This dialog demonstrates an important point: &lt;B&gt;Opening Visual Studio 2008 solutions in Visual Studio 2005 is not supported at the &lt;U&gt;solution level&lt;/U&gt;.&amp;nbsp; &lt;/B&gt;This is triggered by the fact that the version number in the .sln file of any solution created in or upgraded to Visual Studio 2008 has been updated to 10.00 (see Diagram 2).&amp;nbsp; This was a tough decision that we had to take during the design of Visual Studio 2008 and was due to the enormous complexity and cost of supporting the resulting compatibility scenarios.&amp;nbsp; This is an area that we will be actively investigating to improve for our next release.&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=0 width=504 border=1&gt;
&lt;TBODY&gt;
&lt;TR color="gray"&gt;
&lt;TD class="" align=middle width=243&gt;&lt;STRONG&gt;Visual Studio 2005&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" align=middle width=259&gt;&lt;STRONG&gt;Visual Studio 2008&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=243&gt;
&lt;P&gt;Microsoft Visual Studio Solution File, Format Version &lt;B&gt;&lt;FONT color=#ff0000&gt;9.00&lt;/FONT&gt;&lt;/B&gt;&lt;BR&gt;# Visual Studio &lt;B&gt;&lt;FONT color=#ff0000&gt;2005&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=259&gt;
&lt;P&gt;Microsoft Visual Studio Solution File, Format Version &lt;B&gt;&lt;FONT color=#ff0000&gt;10.00&lt;/FONT&gt;&lt;/B&gt;&lt;BR&gt;# Visual Studio &lt;B&gt;&lt;FONT color=#ff0000&gt;2008&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diagram 2: Comparison of .sln files between VS2005 and VS2008&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;Are there any workarounds?&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;If you’re daring, there are a few things that you can do to work around this restriction.&amp;nbsp; Given that these scenarios are not supported, going down these routes may cause your project items to become corrupt, designer elements to break, etc. so please keep these risks in mind.&amp;nbsp; &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;The first workaround is a rather obvious one that you may have already tried.&amp;nbsp; It involves modifying the version of the Visual Studio 2008 .sln file to 9.00.&amp;nbsp; You’ll find that in most cases, this will do the trick and allow Visual Studio 2005 to open the solution.&amp;nbsp; However, if the solution contains any projects and/or settings that are new to Visual Studio 2008 (i.e. usage of new language constructs, designer interfaces, etc.), the solution can fall apart. I would encourage you to &lt;B&gt;not&lt;/B&gt; use this workaround, especially for solutions that contain several projects.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;The second work around involves adding projects created in Visual Studio 2008 directly into an existing Visual Studio 2005 solution.&amp;nbsp; The important point to note here is that &lt;B&gt;Visual Studio 2008 projects are not explicitly blocked from being opened/added to Visual Studio 2005 solutions&lt;/B&gt;. The motivation behind this decision was to ensure that Visual Studio would remain performant by avoiding the performance hit of checking the versioning of every single project in a solution on startup.&amp;nbsp; This workaround has similar risks as the first workaround, but given that it forces you to make a targeted decision as to which project to use in the Visual Studio 2005 solution, it may be a viable workaround for you.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;I&gt;A note about the ToolsVersion attribute&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;For both of the workarounds above, you can update the project files (.csproj, .vbproj, etc.) to control the version of the build tools that will be used. This is done through the ToolsVersion attribute on the Project element. Diagram 3 describes the change that needs to be made in order for a project created in Visual Studio 2008 to invoke the 2.0 version of the build tools.&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=0 width=504 border=1&gt;
&lt;TBODY&gt;
&lt;TR color="gray"&gt;
&lt;TD class="" align=middle width=390&gt;&lt;STRONG&gt;Original .csproj&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" align=middle width=446&gt;&lt;STRONG&gt;Modified .csproj&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=390&gt;
&lt;P&gt;&amp;lt;Project ToolsVersion="&lt;B&gt;&lt;FONT color=#ff0000&gt;3.5&lt;/FONT&gt;&lt;/B&gt;" DefaultTargets="Build" xmlns= "&lt;A class=""&gt;http://schemas.microsoft.com/ &lt;BR&gt;developer/msbuild/2003&lt;/A&gt;"&amp;gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=446&gt;
&lt;P&gt;&amp;lt;Project ToolsVersion="&lt;B&gt;&lt;FONT color=#ff0000&gt;2.0&lt;/FONT&gt;&lt;/B&gt;" DefaultTargets="Build" xmlns= "&lt;A class=""&gt;http://schemas.microsoft.com/ &lt;BR&gt;developer/msbuild/2003&lt;/A&gt;"&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;FONT size=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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diagram 3: How to update the build toolset&lt;/FONT&gt; &lt;BR&gt;&lt;BR&gt;
&lt;H2&gt;Solutions and projects created in VS2005 can be opened in VS2008&lt;/H2&gt;
&lt;P&gt;It's worth mentioning that when opening a Visual Studio 2005 solution or project in Visual Studio 2008, you will see a dialog that will guide you through the upgrade process.&amp;nbsp; The important thing to keep in mind is that this process will update the version number in the .sln file to 10.00, which will prevent this solution from being opened again in Visual Studio 2005.&amp;nbsp; Note that all of the points discussed in this post apply to these upgraded solutions and projects as well.&amp;nbsp; &lt;/P&gt;
&lt;H2&gt;Closing Thoughts&lt;/H2&gt;
&lt;P&gt;As always, I’d love to hear your feedback and questions.&amp;nbsp; I expect there to be some confusion on this topic so feel free to add your comments.&amp;nbsp; Also, if you happen to run into any issues while trying out different scenarios involving solution/project inter-operability between Visual Studio 2005 and 2008, file a bug on the &lt;A href="http://connect.microsoft.com/feedback/default.aspx?SiteID=210" mce_href="http://connect.microsoft.com/feedback/default.aspx?SiteID=210"&gt;Connect website&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5951924" width="1" height="1"&gt;</description></item><item><title>Visual Studio 2008 Beta2 - C# patch released for crashing bug</title><link>http://blogs.msdn.com/djpark/archive/2007/10/12/vs-2008-beta2-c-patch-released-for-crashing-bug.aspx</link><pubDate>Fri, 12 Oct 2007 09:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5416688</guid><dc:creator>djpark</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/djpark/comments/5416688.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=5416688</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Since the the release of VS2008 Beta2, we've been getting&amp;nbsp;several reports of a crashing bug in the C# IDE.&amp;nbsp;&amp;nbsp;&amp;nbsp;If you've run into any crashes and are using explicitly implemented interfaces in a solution that contains project to project references, you're most likely running into this very issue.&amp;nbsp; More specifically, it turns out that when a C# IntelliSense feature (such as IntelliSense) is invoked on a member of an explicitly implemented interface that's defined in another project, the IDE will end up crashing.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;I'm happy to announce that we released a Beta2 patch for this bug yesterday&lt;/SPAN&gt;&lt;/SPAN&gt;.&amp;nbsp; There are a few important notes about this patch you should keep in mind before proceeding:&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=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.5in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&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;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;The patch is a pilot for the VS2008 servicing program so &lt;STRONG&gt;any feedback you provide about the setup experience would be tremendously helpful&lt;/STRONG&gt; in helping us make the final servicing experience golden.&amp;nbsp; Please add your comments below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.5in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;-&lt;SPAN style="FONT: 7pt 'Times New Roman'"&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;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;The patch is currently only available for English SKU’s of VS2008 Beta2 but note that future patches will be available for all VS-supported languages.&amp;nbsp; &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: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&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"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Enjoy!&amp;nbsp; &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DC623F84-BEA6-4B8E-8A43-B654C3B6E4F6&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DC623F84-BEA6-4B8E-8A43-B654C3B6E4F6&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=DC623F84-BEA6-4B8E-8A43-B654C3B6E4F6&amp;amp;displaylang=en&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5416688" width="1" height="1"&gt;</description></item><item><title>Visual Studio Compatibility</title><link>http://blogs.msdn.com/djpark/archive/2007/02/16/visual-studio-compatibility.aspx</link><pubDate>Fri, 16 Feb 2007 05:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1686986</guid><dc:creator>djpark</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/djpark/comments/1686986.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=1686986</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;If you're interested in learning more about the compatibility plans for Visual Studio Codename "Orcas", this is the post for you.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;For products as complex as Visual Studio, achieving seamless compatibility between versions is an immense and ever growing task.&amp;nbsp; This being the case, we’ve spent a considerable amount of time and energy to reduce the barriers experienced by users after upgrading to Orcas.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;One of the efforts that I’ve been involved with over the past several months is the design time compatibility for Visual Studio.&amp;nbsp; In a nutshell, design time compatibility refers to the experience Orcas users will have when working with projects, solutions, and assets from previous versions of Visual Studio.&amp;nbsp; I’ve outlined these experiences in&amp;nbsp;the &lt;A class="" href="http://blogs.msdn.com/djpark/attachment/1686986.ashx" mce_href="http://blogs.msdn.com/djpark/attachment/1686986.ashx"&gt;document&lt;/A&gt; that I've attached to this post&lt;STRONG&gt;.&lt;/STRONG&gt; &amp;nbsp;We're still flushing out some details but I would love to get your feedback on what we have so far so please feel free to comment on this post or send me an email at&lt;SPAN style="COLOR: #1f497d"&gt; &lt;A href="mailto:djpark@microsoft.com"&gt;&lt;FONT color=#0000ff&gt;djpark@microsoft.com&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;FONT color=#000000&gt;More &lt;/FONT&gt;&lt;/SPAN&gt;specifically, I’m interested in the following:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;What are your thoughts on our current plans?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;What are your priorities when it comes to compatibility?&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Have you run into any bugs or noticed any general areas related to compatibility that you feel need improvement?&amp;nbsp; If so, what are they?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;As a side note, run time compatibility is another interesting area where we’ve put a lot of effort, so if you have any comments or questions about that, I’d love to hear them as well.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;As a final side note, check out &lt;A class="" href="http://blogs.msdn.com/jasonz/archive/2005/04/25/411925.aspx" target=_blank mce_href="http://blogs.msdn.com/jasonz/archive/2005/04/25/411925.aspx"&gt;Jason Zander's blog&lt;/A&gt; post from the days of Visual Studio 2005 for more useful information about compatibility.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1686986" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/djpark/attachment/1686986.ashx" length="212992" type="application/msword" /></item><item><title>Hello!</title><link>http://blogs.msdn.com/djpark/archive/2007/01/01/hello.aspx</link><pubDate>Mon, 01 Jan 2007 18:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1396209</guid><dc:creator>djpark</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/djpark/comments/1396209.aspx</comments><wfw:commentRss>http://blogs.msdn.com/djpark/commentrss.aspx?PostID=1396209</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;What better time than the start of a new year to kick off a blog.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Hi, my name is DJ and I’m a program manager on the C# team.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I work primarily on the Visual C# IDE and my job is to make &lt;B style="mso-bidi-font-weight: normal"&gt;your&lt;/B&gt; job as easy as possible.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Considering that I’m fairly new to not only the C# team, but to Microsoft as well, I hope that you’ll join me as I get more involved in the exciting things that are happening here.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1396209" width="1" height="1"&gt;</description></item></channel></rss>