none
TF270015: 'MSTest.exe' returned an unexpected exit code.

    Question

  • The project works well in VS2008 and can be built in TFS 2008 team build.

    Now I'm trying to use build project in TFS 2010.

    Then I can see all of the unit tests were run and passed from "BuildLog.txt", but there is an issue message "warning : TF270015: 'MSTest.exe' returned an unexpected exit code. Expected '0'; actual '1'.".

    And in the built folder, there is no TestResults folder has been created.

    I have no idea how can I deal with it.

    Thanks for anything help.

    Tuesday, June 22, 2010 6:29 AM

Answers

  • Hi Alex,

    TFS Build 2010 will only run VS2010 project as the need to be written in .NET 4.0.

    If you can upgrade your projects to VS2010 then this will solve your problem, otherwise you can edit the build workflow for your project to use the 2008 version of MSBuild if you are still using the 2008 client.

    Hope it helps! If you have any concern, please feel free to let me know!

    Best Regards,

    Cathy Kong

    Monday, June 28, 2010 3:17 PM
    Moderator

All replies

  • Hi Alex,

    TFS Build 2010 will only run VS2010 project as the need to be written in .NET 4.0.

    If you can upgrade your projects to VS2010 then this will solve your problem, otherwise you can edit the build workflow for your project to use the 2008 version of MSBuild if you are still using the 2008 client.

    Hope it helps! If you have any concern, please feel free to let me know!

    Best Regards,

    Cathy Kong

    Monday, June 28, 2010 3:17 PM
    Moderator
  • Hi Alex,

    TFS Build 2010 will only run VS2010 project as the need to be written in .NET 4.0.

    If you can upgrade your projects to VS2010 then this will solve your problem, otherwise you can edit the build workflow for your project to use the 2008 version of MSBuild if you are still using the 2008 client.

    Hope it helps! If you have any concern, please feel free to let me know!

    Best Regards,

    Cathy Kong


    How does one make the workflow use the 2008 msbuild? Here's my problem, we have a build system build on TFS 2008 - it invokes the target MSBuild at various stages to complete some tasks that require itemgroups to be reevaluated - but it just does not work with 2010 - I keep getting the msbuild returned an expected error code.... this is when using the upgrade template

     

     

    Wednesday, July 21, 2010 10:28 AM
  • Hi Rick,

    Have you managed to solve your problem with VS 2008 unit tests and Tema Build 2010 Upgrade Template?

    Would you share the solution, please?

    Thank you!

    Friday, January 14, 2011 3:35 PM