locked
Visual studio 2010 C++ Unit Test could not load file or assembly DefaultTest.dll RRS feed

  • Question

  • I'm encountering some strange behavior from Visual Studio 2010 when working with C++ unit tests. I have a test project in my solution, which references the necessary projects. This was working a few days ago, however this morning, I get the following error when I try and compile the test project:

    Error loading C:\Users\champad\Documents\src\Debug\DefaultTest.dll: Could not load file or assembly 'DefaultTest.dll' or one of its dependencies. The specified module could not be found.

    The Test Explorer is empty because of this (even though there are multiple tests).

    When I go to the output directory, I can see that the DLL isn't there (however, a bunch of other files named DefaultTest are). I tried changing the file name, but that didn't correct the error. I've tried renaming the default output, cleaning the project and rebuilding, but nothing seems to work.

    What am I missing? I haven't done anything between Friday afternoon and Monday morning. I'm not sure why this is no longer building and finding all the unit tests.

    Thursday, August 6, 2015 3:14 PM

Answers

  • Hi DAndreChampagne,

    >>Error loading C:\Users\champad\Documents\src\Debug\DefaultTest.dll: Could not load file or assembly 'DefaultTest.dll' or one of its dependencies. The specified module could not be found.

    Have you referred the “DefaultTest.dll” in your unit tests? I suggest you create a new project and check whether this error still happen. If it happened, it would be helpful if you could share us steps you operate.

    If it did not happen in your new project, I suggest you check whether there is a reference related with “DefaultTest.dll”.

    Here is a similar thread, it may be useful to you.
    # Error loading Test Project dll for C++ test project
    https://social.msdn.microsoft.com/Forums/en-US/b35e9d64-19ac-4bf9-afe1-0b76954c7f33/error-loading-test-project-dll-for-c-test-project?forum=vststest

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, August 10, 2015 5:40 AM