Unit test project not building from build server

后端 未结 2 1392
忘掉有多难
忘掉有多难 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 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.

提交回复
热议问题