Ask a questionAsk a question
 

General DiscussionFailing to upgrade test projects to VS2008?

  • Tuesday, December 11, 2007 5:19 AMDavid R. Williamson MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    If you encounter problems converting 2005 version of test project files (*.csproj, *.vsmdi, *.testrunconfig) in Visual Studio Team System 2008 Development Edition, please try the following manual steps to work around the issue.

     

    1.        Before you begin, please make a copy of all your solution files.  This will save you time later as you go through the upgrade wizard.

    2.        Open the solution with your 2005 test projects in Visual Studio Team System 2008 Development Edition

    3.        If you see Visual Studio Conversion Wizard, click Finish.

    4.        If you see a message “One or more projects failed to convert. These projects are now unloaded and marked as unavailable in Solution Explorer. Reload those projects to determine the cause”, click OK.

    5.        Click Close on the conversion wizard.

    6.        In Solution Explorer, under Solution Items

    ·         Select the .vsmdi file, right click to open the context menu and select Remove. The file will be removed from the Solution Item.

    ·         Select the .testrunconfig file, right click to open the context menu and select Remove. The file will be removed from the Solution Item.

    7.        Keep your Visual Studio open.

    8.        Open Start menu on your Windows. Click All Programs – Microsoft Visual Studio 2008 – Visual Studio Tools – Visual Studio 2008 Command Prompt (if you are on Vista, - right click – Run as Administrator) to open Visual Studio Command Prompt

    9.        On the Visual Studio Command Prompt,

    ·         CD to the directory where your .vsmdi, .testrunconfig files live

    ·         Run “vstst-fileconverter.exe <filename>.vsmdi” (it should say “The format conversion succeeded” in the end)

    ·         Run “vstst-fileconverter.exe <filename>.testrunconfig” (it should say “The format conversion succeeded” in the end)

    10.     Go back to your Visual Studio, in Solution Explorer

    ·         Right click Solution Items to open the context men and select Add – Existing Item... to open the Add File dialog.

    ·         Browse to the directory where your .vsmdi file live, select your .vsmdi and click Add

    ·         Repeat the above two steps to add your .testrunconfig file. Close the Test Run Configuration dialog after it shows up.

    11.     In Solution Explorer

    ·         Select the test project that is “not available.”

    ·         Right-click to open the context menu and select Reload Project.

    ·         You will see the Visual Studio Conversion Wizard again, click Finish.

    ·         Repeat the above three steps for your other unavailable test projects.

    12.     Click menu File - Close Solution, when you are asked to save the solution file, click Yes

    13.     Find all your test project files (.csproj, .vbproj) files under your solution and open them in Notepad (skip for VC++ projects)

    ·         Remove

    <FileUpgradeFlags>0</FileUpgradeFlags>
    <OldToolsVersion>3.5</OldToolsVersion>
    <ApplicationRevision>0</ApplicationRevision>  

    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>

    ·         Change this

    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

     

    ·         To This:

    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />

    ·         Remove this entry if it exists:

    <HintPath>..\..\..\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.UnitTestFramework\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>

    ·         Save all the files in Notepad

       14.     Open the solution again, you should be done.

      

    We apologize for the inconvenience and we are working to produce an update to resolve the issue.  Also, thanks to everyone on the forums for their help in identifying these work around steps, especially John Carneiro.

     

    Yours,

    The Visual Studio Team Edition for Software Testers team

     

All Replies

  • Wednesday, December 19, 2007 3:12 PMDHearn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    The project continues to prompt to convert every time the solution opens. I was able to fix by changing (not removing) the FileUpgradFlags, OldToolsVersion, and UpgradeBackupLocation to the following:

        <FileUpgradeFlags></FileUpgradeFlags>

        <OldToolsVersion>2.0</OldToolsVersion>

        <UpgradeBackupLocation></UpgradeBackupLocation>

     

  • Wednesday, January 02, 2008 12:02 PMFennnanToo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    The project continues to prompt to convert every time the solution opens. I was able to fix by changing (not removing) the FileUpgradFlags, OldToolsVersion, and UpgradeBackupLocation to the following:

        <FileUpgradeFlags></FileUpgradeFlags>

        <OldToolsVersion>2.0</OldToolsVersion>

        <UpgradeBackupLocation></UpgradeBackupLocation>

     

    It works to me leaving only the

    <FileUpgradeFlags></FileUpgradeFlags>

    line

  • Friday, January 04, 2008 11:37 AMJohn Carneiro Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello, I have written a small utility to lessen the manual conversion steps.

    of the conversion. It can be used to Convert Unit Test Projects
    from Microsoft Visual Studio Team System Development Edition
    Version 2005 to Version 2008
    until an official patch from Microsoft is available as a

    zipped file here

     

    http://mysite.verizon.net/johncarneiro/VS2005ToVS2008.zip

     

    The zip file contains as follows:

    - VS2005ToVS2008.exe
    - readme.txt

     

    -

     

    Here is the contents of the readme.txt:

     

    The VS2005ToVS2008.exe
    utility is used to Convert Unit Test Projects
    from Microsoft Visual Studio Team System Development Edition
    Version 2005 to Version 2008
    until an official patch from Microsoft is available:

    Directions:

    - Copy the VS2005ToVS2008.exe utility to a directory on your computer.

    - Open the *.sln in VS2008 and follow conversion wizard.
    Upon finishing wizard, exit the studio and open a VS2008 command line
    prompt.

    - Run the VS2005ToVS2008.exe utility with one of the available
    command line options.

    - A log file named VS2005ToVS2008.log is generated for conversion details.

    -

    Example usage:

    Converts *.sln file at the local path, associated files and subfolder files:
    >VS2005ToVS2008.exe

    Converts the *.sln file at the specified path, associated files and subfolder files:
    >VS2005ToVS2008.exe C:\MyWorkArea\MySolutionFolder

    Displays help
    >VS2005ToVS2008.exe /?

  • Thursday, January 10, 2008 6:20 AMChristine Zhao - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    The project continues to prompt to convert every time the solution opens. I was able to fix by changing (not removing) the FileUpgradFlags, OldToolsVersion, and UpgradeBackupLocation to the following:

        <FileUpgradeFlags></FileUpgradeFlags>

        <OldToolsVersion>2.0</OldToolsVersion>

        <UpgradeBackupLocation></UpgradeBackupLocation>

     

    It works to me leaving only the

    <FileUpgradeFlags></FileUpgradeFlags>

     

    All these are different ways to fix the logs of the bad conversion of the project files happended in the first time. Did you try our workaround step 13, it should also work for you.

     

    Thanks,

    Christine 

  • Thursday, January 10, 2008 2:23 PMDHearn Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Your workaround step 13 works if you remove the '0' from the FileUpgradeFlags so that it is as follows:

    <FileUpgradeFlags></FileUpgradeFlags>

  • Friday, January 11, 2008 5:31 PMJohn Carneiro Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,

     

    I updated the utility to Convert Unit Test Projects
    from Microsoft Visual Studio Team System Development Edition
    Version 2005 to Version 2008 to upgrade not just unit test

    projects found in a solution folder that match the criteria

    *.Test.csproj, but now bases the criteria to convert on

    all *.csproj's that have in them a reference to

    Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

     

    This new version of VS2005ToVS2008.exe

    has a file version of 1.0.0.1.

     

    http://mysite.verizon.net/johncarneiro/VS2005ToVS2008.zip

  • Monday, February 18, 2008 10:04 AMgrantmi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Upgrading a solution of C++ Test Projects (nearly works)!

     

    The Upgrade wizard ran on the VS2005 solution and accoding to the upgrade log, converted all the projects.  However the projects then appear as Unavailable in the new VS2008 solution.

     

    I found that I could add the converted projects into a new solution without any problem.  I noticed that the new solution did not have a "Solution Items" folder with 2 files in (localtestrun.testrunconfig and  UnitTests.vsmdi) which the original VS2005 solution did.

     

    So I deleted the "Solution Items" folder from the converted VS2005 solution (the one with the unavailable projects), saved it.  On reopening the solution the projects were now available.

     

    I am not sure what the "Solution Items" folder and the 2 files were for (VS2005 just put them there).  But it seems to all work without them in VS2008.

     

  • Tuesday, March 04, 2008 4:18 PMFreddie Davis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am having the same problem with Visual Studio 2008 professional edition.  Should I do the same steps?

     

  • Friday, June 06, 2008 11:50 PMChristine Zhao - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    FYI, we have fixed this issue in KB947171. It is available in VS 2008 SP1 Beta1. You can download SP1 beta1 from the following link: http://www.microsoft.com/downloads/details.aspx?FamilyId=CF99C752-1391-4BC3-BABC-86BC0B9E8E5A&displaylang=en

     

    The RTM version of VS 2008 SP1 will be released soon.

     

    Thanks,

    Christine

     

  • Friday, August 08, 2008 1:24 PMMHartmann Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    After following the workaround steps to upgrade my testing projects from VS2005 to VS2008 they are working now. But now I'm unable to add some new tests to this upgraded testing projects. Everytime I try to add a new test with the wizard I get the following error message:

     

    "UnitTestFrameworkAssembly doesn not contain GenericParameterHelper type".

    The "doesn not" part of this message is not a typing error of myself. It's the original message!

     

    Adding some new tests manually is not a problem and they are working fine.

     

    Any ideas what's the problem for the wizard?

     

    Best Regards

    Michael

  • Tuesday, August 19, 2008 11:44 PMFreddie Davis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have downloaded the RTM version of SP1 and it works great for ASP.Net application but I am having problems with webpart solution.  I am getting the message that .csproj is not installed and it is installed.  Can someone help me?

     

  • Tuesday, September 23, 2008 7:32 PMShitalS Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a test project created in VS2005. I am trying to convert it to VS2008. I am able to successfully convert .sln ,.csproj and .testrunconfig files. I used the tool vstst-fileconverter.exe convert the orderedtest.template file, the conversion was reported to be successful. But the template file is missing the key "ContinueOnFailure". This key was set to true in VS2005 orderedtest.template file. Why did it disappear when the conversion succeeded? How do I add this?

     

  • Thursday, June 04, 2009 2:29 PMTBQ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I have VS2008 SP1 + CU1 plus VSDB GDR r2.  The two files mentioned in KB947171 have a newer version and date on my system (9.0.30729.1)

    The Wizard did not do the job on my solution.  A little manual editing got me half way there, but the wizard pops up twice, I suppose for vsmdi and testrunconfig files.  The solution contains three VSDB database projects and three VSDB test projects, and I am in the process of adding a VSDB server projects in the partly converted VS2008 solution.

    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Enterprise

    <snip>

    Microsoft Visual Studio Team System 2008 Database Edition GDR Version 9.1.40413.00

    <snip>

  • Thursday, June 04, 2009 2:47 PMTBQ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Apparently, my problem wasn't with the vsmdi and testrunconfig, which had been upgraded (I vaguely recall them not being correct initially, but I'm not sure exactly what I did).  Two of my test projects had not been upgraded.  Making the manual edits prescribed here took care of it AFAICT (not at the point of running my tests yet, though).  I did find one other entry to be addressed in one of my project files:

    I updated:
      <Import Condition="'$(TeamBuildConstants)' != ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\TeamData\Microsoft.VisualStudio.TeamSystem.Data.TeamBuildTasks.targets" />

    to:
      <Import Condition="'$(TeamBuildConstants)' != ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.VisualStudio.TeamSystem.Data.TeamBuildTasks.targets" />

  • Thursday, June 18, 2009 2:43 PMBalintN Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    To anyone hitting this page today, the short and great answer is: install Visual Studio 2008 SP1, that will do the upgrade like a charm.
    Regards,
    B
    BalintN
  • Thursday, June 18, 2009 3:13 PMTBQ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Maybe yours did.  Mine didn't - I had SP1 installed and ran into a number of issues with the upgrade that covered VS2005 with DBPro against SQL Server 2000/2005 and related test scripts to VSTSDB GDR2 against SQL Server 2008.  I also had a custom test extension which needed a couple of reference changes.  It seems that the instructions posted by David Williamson may be the best bet for converting.  Unfortunately, I didn't find those instructions until I was well into my conversion effort, but they helped me finish the job.