开发者

Is it possible to get VS 2010 to build before running tests

I have a Class Library project in Visual Studio 2010 that I want to test. I have created a seperate Test project in the same solution to test it. The Test project references the Class Library project. I created some tests ran them and they failed which was expected. However when I fixed the Class Library and ran the tests again it still failed. This was because the Class Libary project had not been rebuilt.

Is there some way to get Visual Studio 2010 to automatically build the Test project and all its dependancies before running the tests?

EDIT:

Some things I have checked:

  1. I've checked the reference is a project reference.开发者_如何学Python
  2. I've checked the Test project is last in the build order.

Still no joy. In case it makes any difference I am running the tests using the "Run All Tests in Solution (Ctrl+R, A)" button on the tool bar.


Right click on your test project, select Project Build Order and set your class library project to build before your test project, this should works ;-)


Ok, Here is what I did to fix this:

  1. Select the Test->Edit Test Settings->Local menu item.
  2. In the resulting dialog select Deployment.
  3. Check the 'Enable deployment' setting.
  4. Apply and Close the dialog.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜