Nour
Nour

Reputation: 5449

why do i have to rebuild the test project, whenever i change the code?

I have visual studio 2010, and a unit-test project.
when i run (debug test in the current context),then stop it,and then change the code,

i have to rebuild the project, otherwise the project will run without debugging, and it will use the old code !!!

why is that happening ?

Upvotes: 1

Views: 1813

Answers (2)

Marm0t
Marm0t

Reputation: 931

When you 'run' the code you are running a compiled executable. When you change the code this does not change the compiled executable (i.e. you have to 'rebuild' it).

Upvotes: 1

Peter van Kekem
Peter van Kekem

Reputation: 1447

Because the tests needs a compiled version of the code, since they need to execute your code to test whether it works or not.

Edit: in my environment, the test project is in the same solution. Running the test will automatically rebuild the project.

Upvotes: 1

Related Questions