0

I have a continuous webJob and am running it through CI-CD pipeline. After successful release webjob is showing as restart pending. Getting an error in the logs

D:\local\Temp\jobs\continuous\MiddleCompassServer\rrwnz5aj.4el>dotnet MiddleCompassServer.exe

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'D:\local\Temp\jobs\continuous\MiddleCompassServer\rrwnz5aj.4el\'.

Failed to run as a self-contained app. If this should be a framework-dependent app, add the D:\local\Temp\jobs\continuous\MiddleCompassServer\rrwnz5aj.4el\MiddleCompassServer.runtimeconfig.json file specifying the appropriate framework.

riQQ
  • 9,878
  • 7
  • 49
  • 66
Bad_Coder
  • 163
  • 1
  • 3
  • 9
  • If i run the same through Visual Studio the status of Web Job is Running.. This error is happening only through Pipeline – Bad_Coder Sep 09 '19 at 08:06
  • Possible duplicate of https://stackoverflow.com/questions/38085430/the-library-hostpolicy-dll-was-not-found – TrevorBrooks Sep 09 '19 at 13:42

1 Answers1

0

There was chance that the dotnet core version specified in .json file mismatch with the version installed. You can try the solutions given in this thread mentioned by TrevorBrooks.

If above thread didnot workout for you.Try run .exe directly from console (./MiddleCompassServer.exe ) without using dotnet. as pointed out in this thread.

You can also try adding the runtimes setting in project.json and modify the RuntimeIdentifiers in .csproj file as this thread pointed out.

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43