Reference Microsoft.VisualStudio.QualityTools.UnitTestFramework for CI build

前端 未结 5 1553
故里飘歌
故里飘歌 2021-01-01 09:39

I have created a C# test project in VS2015 RC. it builds locally but when i attempt to build on our CI build server (TeamCity) it fails with errors:

U

5条回答
  •  萌比男神i
    2021-01-01 10:05

    Hmm I have some ideas, so choose the one that best fits your needs

    1. A simple answer should be mark the DLL to copy local and use a folder like Assemblies in the same folder of the solution and references "Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll"
    2. Install Visual Studio in your build server. Sounds nuts but it's the closest to "developer machine" that you have.
    3. Install the DLL in the GAC so you don't have to bother with this.
    4. Fix the NuGet package (Adding a reference for the .NET Framework version) and use it.
    5. Downgrade your .NET Framework version so you can use the NuGet package.
    6. Create your own NuGet server! (and add the reference of the DLLs you need).

    IMHO I'd choose the first answer, because it seems to be the "best way" to use NuGet to resolve all your packages problems but you are using a DLL that you don't know if it should be trusted.

    In system used in "old" languages like C, or C++ it's common you download the source code and the libraries needed for the code to run so I do not think the NuGet package it's the best solution.

    Using the first option you always have the same version and could check the MD5 of the file and know exactly what is running in your build server.

    Maybe the real best option should be 6. When you use your own NuGet server to handle your DLLs making your live more awesome and trustable.

提交回复
热议问题