Ask a questionAsk a question
 

AnswerVS2005 and VS2008 co-existence for test projects

  • Monday, May 26, 2008 11:05 AMHans-Peter Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I want to develop and maintain the same solution with vs2005 and vs2008. Jon Skeet has written a blog about co-existence a it sound promising: just the solution file is different and there is a minor change on project files. Since we started with VS2008 we created a new VS2005 solution and just added the VS200 solution file to the existing VS2008 solution. In this new solution file I reference the already existing projects. It seems to work fine - but not for the tests!

    Running the tests of the test project in VS2005 I get an error: Error xxx UTA052: MyNamespace.MyTest is not a test class!

    Any hints what to do?

     

    Thanks

    Hans-Peter

     

     

Answers

  • Tuesday, May 27, 2008 9:57 PMDavid Gorena Elizondo - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Ok, I undestand now. Unfortunately, we do not support that scenario. We've made a lot of improvements to test projects in version 2008, and we do not support going back to 2005. We do support the other way around: If you created a test project in 2005, we will convert it to the 2008 version.

     

    Thanks,

    David Gorena Elizondo

    [MSFT] VSTT

All Replies

  • Monday, May 26, 2008 9:48 PMDavid Gorena Elizondo - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Hans-Peter,

     

    Did you go through the conversion wizard for your test projects? There are files that have to be converted in order for your tests to work appropriately, so I suggest going through this conversion process (the wizard should appear when attempting to open a VS2005 project using VS2008) and seeing if that fixes your problem.

     

    Thanks,

    David Gorena Elizondo

    [MSFT] VSTT

  • Tuesday, May 27, 2008 5:25 AMHans-Peter Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

    thanks for your reply. Sorry for being unclear: I have created the solution including all projects with VS2008. Now I want to use the projects in a VS2005 solution as well. That works fine with Class Library projects with manually editing one line:

    Code Snippet
     <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

     

     

    It does not work for Test projects. Is there a way to use one single Test project in a VS2008 and a VS2005 solution?

     

    Thanks,

    Hans-Peter

  • Tuesday, May 27, 2008 9:57 PMDavid Gorena Elizondo - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Ok, I undestand now. Unfortunately, we do not support that scenario. We've made a lot of improvements to test projects in version 2008, and we do not support going back to 2005. We do support the other way around: If you created a test project in 2005, we will convert it to the 2008 version.

     

    Thanks,

    David Gorena Elizondo

    [MSFT] VSTT

  • Monday, September 01, 2008 9:45 PMDave McKinstryMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hans-Peter,

     

    You've probably moved far past this but I ran into a similar problem and found a fix.  I manually converted a 2008 test project to 2005 and received the same error.  The solution was fixing the assembly references...  The 2005-based project was still referencing the 2008 version of Microsoft.VisualStudio.QualityTools.UnitTestFramework.  I'm going to blog a few more details at http://weblogs.asp.net/dmckinstry.

     

    -Dave McKinstry