开发者

Problem with using MSTest projects in multiple solutions under VS2010 Professional

I've got a solution that includes an assembly for utility functions, and an MSTest project for testing those functions. One of them depends on a DLL, which by magic is copied to the correct test output folder, and all of my tests work great.

I've also got a "master" solution that includes all of my assemblies and their respective MSTest projects. The problem here is that the MSTest project which requires that other DLL fails to run some of the tests because the dependency is missing.

I read up on modifying Local.testsettings, and I added the required file, but the test still fails and I don't see the DLL in the Out folder. One notable difference between the two solutions is that the former includes Local.testsettings, project.vsmdi, and TraceAndTestImpact.testsettings, whereas the latter does not. I've blindly added those files to the latter solution, but this causes issues, like other tests not running properly, and in addition it doesn't fix my original problem.

Is there a special trick to creating a master solution that aggregates all 开发者_StackOverflow中文版of my unit test projects?


You mention that you've added the Local.testsettings to your project, but have you enabled deployment in the settings and added the dll as a file to deploy?

Problem with using MSTest projects in multiple solutions under VS2010 Professional


Few other recommendations:

  • verify that the relative path to the dll from the local.settings file is correct
  • verify that the Team City build definition is using your local.testsettings
  • if all else fails, try running mstest.exe from the command line specifying the test assemblies (testcontainers) and test settings manually. You should see any deployment issues as warnings.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜