Unit test project cannot find assembly under test (or dependencies)

前端 未结 10 1990
刺人心
刺人心 2021-01-02 00:31

When I try to run my Unit Test project, I get the following error:

Could not load file or assembly \'ASSEMBLY_NAME, Version=1.0.0.0, Culture=neutral, Pub

10条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-02 01:09

    There is a common error about executing unit tests : the execution folder.

    Are you sure your unit test is running in the correct folder ? Not in the famous obj folder ?

    In the obj folder, only generated assemblies are copied, not dependencies -even copy local true-. So if your test is launched from this folder, all the dependencies will missing.

提交回复
热议问题