Home » IIS » “rzc discover exited with code -2147450749” and “hostpolicy.dll required” errors

“rzc discover exited with code -2147450749” and “hostpolicy.dll required” errors

We have recently upgrade a .NET Core 2.2 application to 3.1 version. While trying to run it in Visual Studio, we came across “rzc discover exited” and “hostpolicy.dll required” errors:

  • In Visual Studio output while trying to run the solution: rzc discover exited with code -2147450749
  • In PowerShell after performing “build run” command: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in [path]
rzc discover exited with code -2147450749

Solution for “rzc discover exited with code -2147450749” and “hostpolicy.dll required” errors

The solution was simple: Reinstalling (or repairing) .NET Core! You may need to repair Visual Studio as well.

After fixing these issues, you may see another error, “HTTP Error 500.30”. Here is the root cause and solution for this error: HTTP Error 500.30 – ANCM In-Process Start Failure

References:

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.

1 thought on ““rzc discover exited with code -2147450749” and “hostpolicy.dll required” errors”

Leave a Comment