5

Consider that i am changing only one test/unittest project, and if i try to run that it builds the unit test project(accepted) and all the other dev projects(which is not really required).

how can i avoid this? i have 100+ projects in the solution so each unit test case run taking really long time because of the project build.

codechef
  • 59
  • 3
  • 5
    What would be the point? If you don't rebuild, the tests may be running against old code and will tell you nothing. What you really should be doing is speed up your build... – Oded Nov 01 '12 at 18:57
  • Consider that i have rebuild the code. then i change only a test case and i am running the the changed test case. ideally it should build only the tect code not the product, but it builds the complete product, how can avoid this? – codechef Nov 01 '12 at 19:38
  • You can build the test project alone. How are you building? – Oded Nov 01 '12 at 20:07
  • I am not building the test project, after editing the test cases i am running the unit test, which builds the complete code. and also if i build the testproject it builds all its dependent project, ideally which should not, becuase it is already built once – codechef Nov 01 '12 at 22:51
  • @Oded The point is to not wait several minutes on a full rebuild of a large web site when you only changed one line of code. Anyway, Visual Studio 2013 Update 2 supports what OP is asking for. Unfortunately, I don't know if VS 2010 ever got a patch for it. See https://connect.microsoft.com/VisualStudio/feedback/details/809777/running-a-single-unit-test-in-visual-studio-2013-causes-entire-solution-to-be-built – ThatMatthew Feb 23 '16 at 20:08
  • Look at this answer: https://stackoverflow.com/questions/8410333/how-not-to-build-before-executing-unit-tests-in-visual-studio-2010 – Maksym Bondarenko Sep 26 '17 at 02:31

1 Answers1

0

Are you using accessors? MS accessors may force rebuilding all "accessor-dependent" projects, which in turn may force to rebuild all solution.

p.s. That should be comment to your answer, but i don't have enough rep points to add comments.

nikita
  • 2,737
  • 2
  • 20
  • 26