Search code examples
c#unit-testingtestingbreakpoints

Unit Test is skipping all break points


I've created a class with a funcion and than I've created a unit test to test it. I've than updated somethings on my class and referenced the dll to it on the UnitTest after building the class after the changes. When I run the unit test in debug mode it skips every break point thats on the fucntion in the class, but when I put a break point in the UnitTest it self it shows me an error message saying that the module has change since last time, even after I reference it again. What is wrong? Do I need to rebuild the class and than reference it in the test?


Solution

  • I sometimes get this outside of a unit test. The way I fix this is to:

    1. Clean the solution
    2. Close Visual Studio
    3. Ensure the app isn't hosted in IIS Manager (if an ASP.Net app)
    4. Reopen the solution
    5. Rebuild the solution