Unit test project not building from build server

后端 未结 2 1389
忘掉有多难
忘掉有多难 2020-12-30 21:35

My VS2010 solution has a test project in it. The unit tests themselves reference the following namespace:

using Microsoft.VisualStudio.TestTools.UnitTesting         


        
相关标签:
2条回答
  • 2020-12-30 21:53

    The specific answer for me and a Visual Studio 2010 solution was:

    1. Install "Test Agent 2010" from Visual Studio Agents 2010
    2. Restart Windows
    3. Install Visual Studio 2010 Service Pack 1
    4. Restart Windows
    5. Ensure the projects References are updated to point at "Microsoft.VisualStudio.QualityTools.UnitTestFramework" "10.1.0.0" and not "10.0.0.0".
    0 讨论(0)
  • 2020-12-30 22:03

    The .UnitTestFramework.dll sits in C:\Program Files... folder and you have a reference to it.

    1. Create directory under your source control eg. Source/Binaries
    2. Copy the said dll into Source/Binaries
    3. Remove the reference to .UnitTestFramework.dll from your unit test assembly
    4. Add the reference to .UnitTestFramework.dll to your unit test assembly but this time select the dll that is now under Source/Binaries

    After that you can checkin your changes (make sure the Source/Binaries folder is checked in) and build the solution. When build server builds the solution it should get the dll from the source control.

    0 讨论(0)
提交回复
热议问题