Wednesday, July 6, 2011

The project has not been built - Resharper error when run unit tests

If you use Reshaper's Unit Test Explorer to run unit tests sooner or later you may run into an error dialog which says "The project X.X has not been built".


The reason of that is simple enough - just verify in Visual Studio Configuration Manager that your test projects are marked to be build.


Each time you run tests in Unit Test Explorer it re-builds the test project. So if it's excluded from the build process in Configuration Manager it won't build and Resharper cannot find the library.

16 comments:

  1. Hehehe This was getting in my way! Thanks for sharing this... :)

    ReplyDelete
  2. It helped, thx, verry annoying error was))

    ReplyDelete
  3. Awesome .. thank you :)

    ReplyDelete
  4. Thanks! After checking the configuration manager, I realized the project in question was only set to build under a different configuration.

    ReplyDelete
  5. Thanks a lot, you saved me! :)

    ReplyDelete
  6. Just by the by, I've recently found that if I'm setting up a new solution file, as well as ensuring the test projects are marked to build and rebuilding I actually need to close and re-open Visual Studio (you might be able to just unload and reload the solution).

    (Basically, turn it off and on again)

    ReplyDelete
  7. Thanks a lot! You are the man!

    ReplyDelete