I have been using VS2017RC with .Net core pretty successfully until upgrading to SDK and runtimes 1.1. Once I upgraded to 1.1, I now have to compile the solution 2 times to get it to run. The error on the first attempt at running is always: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Path to project bin\bin\Debug\netcoreapp1.1'. After a 2nd compile, it always works. The error is not very helpful and as you can see here: #1894- Others are having the same issue. In #1894, steps to reproduce are listed. I did switch to the nightly builds for a couple of hours to see if this has been addressed and the same issue still exists.
If anyone figures out a workaround, I would appreciate it. This has well over doubled my time to change anything in the application. Thank you.
Do you happen to know what this issue is and If there is any kind of workaround I can try on my end. This has completely stalled my development now. Thanks in advance.
I think this is fixed. I tried reproing it, and with an older version of the .NET CLI (1.0.0-preview5-004232) that I had installed, it always failed to run with the hostpolicy.dll error. However, when I tried it with the version of the CLI we're using in the .NET SDK (1.0.0-preview5-004456), dotnet run always succeeded for me. In aspnet/Home#1894, @IsaackRasmussen also reported that a later version of the CLI (1.0.0-rc4-004578) fixed the issue.
Closing this out. Please reopen if you are seeing with the latest CLI.
Updating to 1.1.1 with the security fix and updating to the latest 2017RC solved this problem for me.
I am facing this issue with Visual Studio 2017, Preview 3. Any fixes, why is it becoming so big a task to understand the error messages and resolve in the newer versions of .Net.
Most helpful comment
I am facing this issue with Visual Studio 2017, Preview 3. Any fixes, why is it becoming so big a task to understand the error messages and resolve in the newer versions of .Net.