Unable to find testhost.dll. Please publish your test project and retry

前端 未结 19 1038
星月不相逢
星月不相逢 2021-02-01 11:40

I have a simple dotnet core class library with a single XUnit test method:

TestLib.csproj:


  
            


        
19条回答
  •  北海茫月
    2021-02-01 12:13

    Got this error, when trying to debug a unit test. Below are the steps I tried.

    • Step 1: Installed Microsof.TestPlatform.TestHost and tried to run the test but no luck.
    • Step 2: Changed Target framework from .NET Core 2.0 to 2.1 and tried to run the test but no luck.
    • Step 3: Closed and opened VS2017 and tried to run.

    Yay!!! it worked :-) Never miss to try the last step ;-) Hope this helps someone like me.

提交回复
热议问题