<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>.NET'</title><link>http://blogs.interknowlogy.com/billsheldon/category/164.aspx</link><description>.NET'</description><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.111</generator><item><dc:creator>Bill Sheldon</dc:creator><title>Working with Both VS 2005 and VS 2008 B2 on the Same Project</title><link>http://blogs.interknowlogy.com/billsheldon/archive/2007/08/29/21175.aspx</link><pubDate>Wed, 29 Aug 2007 14:52:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/billsheldon/archive/2007/08/29/21175.aspx</guid><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;Microsoft recently released Visual Studio 2008 Beta 2 (&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;&lt;FONT face=Calibri size=3&gt;http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;).  Being the type of developer who is always interested in such tools and more importantly currently being involved in a couple Windows Presentation Foundation 3.0 projects I was one of the first to download a copy.  One of the new features of Visual Studio is that it allows you to target your builds at the .NET 2.0, .NET 3.0 or .NET 3.5 versions of the .NET Framework.  &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;My expectation although the documentation doesn&amp;#8217;t claim it, is that I would be able to start using VS 2008 while other members of my team continued to use the older Visual Studio 2005 with the November 2006 CTP extensions for WPF support.   I was partially (mostly in fact) correct &amp;#8211; but it requires a few &amp;#8216;tricks&amp;#8217;, and more importantly even for true .NET 2.0 projects that isn&amp;#8217;t a true statement.&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 color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face=Calibri&gt;The warning shot was fired when I opened the project solution.  The first thing that VS 2008 did was initiate a conversion wizard to convert the solution and project files on the project.  It kept them targeting .NET 3.0, but they would no longer open in VS 2005.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Fortunately I hadn&amp;#8217;t checked anything into TFS so I copied the files and undid my changes.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;(Note: I later tested with .NET 2.0 projects and the result is the same.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;There is actually a reason or arguable merit for this, as I&amp;#8217;ll explain as I discuss how to manage this scenario.)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;So what I then did was take my solution and project files which I had converted and copied out and named them with the original project name plus &amp;#8220;2008&amp;#8221; on the end.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;This meant I still had the original project files and the newly converted files.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;In comparing these files it was apparent the scope of differences was minimal &amp;#8211; in fact it was mainly a couple strings to reflect that these were in fact 2008 versions of the same file.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;So I modified the solution file and instead of referencing the projects in the solution by their original name I adjusted the solution file references to be the other &amp;#8220;2008&amp;#8221; versions of my project files.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;I then reopened my new solution file in Visual Studio 2008 and found that my solution would build and was maintainable.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;In fact I was able to work in this mode quite literally for a couple of weeks with no issues what so ever.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;It then came time to package this project for deployment.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;We were using a Click Once deployment model and this is where two issues were discovered.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;The first issue was that Visual Studio 2008 Beta 2 did not include a signed .NET 3.0 Framework redistributable package that you can add as a dependency to your project.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;There wasn&amp;#8217;t much to be done about this but I did mention it along with my other problem to Microsoft.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;The second issue was that while in the project properties, if I clicked on the Security tab, Visual Studio 2008 crashed.  Not threw an error - it crashed and burned.  As part of being a Microsoft MVP I have access to a shortcut for contacting a couple people on the development team about issues when I&amp;#8217;m working with something like VS 2008 Beta 2.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;In this case I mentioned my concerns about having new project types, my concern with the .NET 3.0 redistributable and &lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;my issue with the Security Tab for my project&amp;#8217;s properties causing Visual Studio 2008 to crash.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;This got the attention of Eric.Knox one of the &amp;#8216;developers&amp;#8217; @Microsoft who &lt;B style="mso-bidi-font-weight: normal"&gt;email&lt;/B&gt;ed me about reproducing the problem.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Because the customer was comfortable with me sending this problem to Microsoft I forwarded Eric a complete copy of my solution files (fortunately it was a relatively small code base).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face=Calibri&gt;Eric was immediately able to reproduce my problem (which was good) since I was now bothering someone who's time is arguably more valuable writing new features into the product &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;After a couple hours Eric contacted me to tell me what the problem was.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;In short when I readdressed my solution file to reference my project files, I failed to also adjust the project references in my project files to do the same thing.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;For most of Visual Studio this wasn&amp;#8217;t a problem, but in the case of the security tab this caused a fatal error.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Eric was able based on my code to find this in a relatively short period of time &amp;#8211; and in the RTM version of Visual Studio 2008 the environment won&amp;#8217;t crash if you repeat my mistake.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;At the same time however, this is still an error in Visual Studio 2008 and the error message you get may not be the most helpful.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;The key is you need to be certain to convert the project references in both your solution and project files if you want to develop on Visual Studio 2008 in parallel with someone using Visual Studio 2005.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Aside from the preceding issue I&amp;#8217;ve had only one issue (that I&amp;#8217;m about to discuss) working this way, and being able to work in Visual Studio 2008 has made me far more productive then I would have been with the Visual Studio 2005 environment and the XAML editor which is almost non-functional (for complex XAML).&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;In general I&amp;#8217;ve just manually added new classes placed in the Visual Studio 2005 versions of the project files to mine and vice versa.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;The coordination on that level has been very easy and relatively painless &amp;#8211; so if you are in the scenario where not everyone on a team is in a position to move to Visual Studio 2008 simultaneously, I&amp;#8217;d still go for it on .NET 3.0 projects.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;However, there is the remaining issue which appears to coincide with the reason Microsoft is moving the project files forward.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;I stumbled on this issue quite by accident when during development I created a new class in the project.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;As part of this new class I happened to syntax which is based on the new release.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;I didn&amp;#8217;t reference any .NET 3.5 libraries but I wrote my VB/C# code using syntax which the Visual Studio 2008 compiler recognized.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;However, Visual Studio 2005 and Visual Studio 2008 don&amp;#8217;t use the same build engines and as a result when a team member tried to compile my new class the compiler kicked out my code.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;So if you are going to attempt this route recognize that although you are still building a .NET 2.0 compatible project (based on the libraries which are referenced) you&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;will have access to language features that are interpreted by the compiler at build time which aren&amp;#8217;t compatible with the build engine a Visual Studio 2005 developer will use.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Again this wasn&amp;#8217;t a major problem, in fact it was incredibly easy to recognize and resolve but this is probably the type of issue that the folks at Microsoft were most concerned with when they made it so that the same project file wouldn&amp;#8217;t work in both build environments.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri color=#000000 size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri color=#000000 size=3&gt;Finally of note, keep in mind that a new version of TFS (TFS 2008) will be shipping with Visual Studio 2008 along with a new version of Team Build.&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;Both have several new features that you&amp;#8217;ll want to access and since your old Team Build 2005 won&amp;#8217;t like Visual Studio 2008 projects &amp;#8211; you&amp;#8217;ll need to upgrade to TFS 2008 in conjunction with or before you move your developers to Visual Studio 2008, so make sure you start looking at that Beta 2 product now as well.&lt;/FONT&gt;&lt;/P&gt;&lt;img width="0" height="0" src="http://nerdnotes.com/blog/cptrk.ashx?id=eea1cadf-309e-4e66-a09d-715718bb1306"&gt;&lt;img src ="http://blogs.interknowlogy.com/billsheldon/aggbug/21175.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>