The library hostpolicy.dll was not found

前端 未结 13 1201
自闭症患者
自闭症患者 2020-11-30 08:28

I have a simple .NET Core project (console app) that I\'m trying to compile and run. dotnet build succeeds, but I get the following error when I do dotnet

13条回答
  •  旧时难觅i
    2020-11-30 09:02

    I had this same problem with a .NET Core 3.0 WPF app, but I found that my app wouldn't run in Visual Studio 2019 either.

    I discovered on the project properties page (right-click on project > Properties) that the Target framework was set to .NET Core 3.0.

    I'd recently updated VS 2019 which had also installed .NET Core 3.1, so I switched to that in the dropdown, and it worked again.

    (I also had to update my shortcut to point to the netcoreapp3.1 folder instead of the previous netcoreapp3.0 folder.)

提交回复
热议问题