Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable unit tests in Release mode under TFS

I want to setup the TFS to build both Debug and Release versions of my solutions but only run the unit tests when in Debug mode. I've tried disabling the builds for the test projects in my solutions' Configuration Properties, but to no avail. And what's annoying is that the tests will always fail in Release mode because it can't seem to find the files even though they exist...

So anyone know how to get TFS to run the unit tests only in Debug mode (but still build both Debug and Release modes)?

like image 392
SF Lee Avatar asked Nov 24 '25 17:11

SF Lee


1 Answers

In VS2010:

Team ExplorerProjectBuilds → In your "Build Definition" select Edit Build DefinitionProcess

Here you should configure:

  • 1.Required → Items to Build: select herer project and configuration to Build, i.e. Release or Debug in your case
  • 3.Advanced → Disable Tests: True/False
like image 112
Akim Avatar answered Nov 27 '25 10:11

Akim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!