Ask questionsHTTP Error 500.31 - ANCM Failed to Find Native Dependencies
I upgraded an ASP.NET Core 2.2 application to 3.0.
It works fine in the development environment, but when I publish it to the test environment I get a HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
error.
The documentation says that this error most commonly means that the Microsoft.NETCore.App
or Microsoft.AspNetCore.App
runtime isn't installed but I installed the ASP.NET Core/.NET Core: 3.0 Runtime & Hosting Bundle, and I'm not sure what else I can do.
The Event Viewer/stdout logs this:
An assembly specified in the application dependencies manifest (ETR Lite.deps.json) was not found: package: 'Microsoft.Data.SqlClient', version: '1.0.19249.1' path: 'runtimes/win/lib/netcoreapp2.1/Microsoft.Data.SqlClient.dll'
I don't understand why it's looking under netcoreapp2.1
for a netcoreapp3.0
application, and why it can't find the dependency even though it's present in the refs
folder.
If I manually put that DLL in the folder it's looking for it I get
An assembly specified in the application dependencies manifest (ETR Lite.deps.json) was not found: package: 'System.Runtime.Caching', version: '4.5.0' path: 'runtimes/win/lib/netcoreapp2.0/System.Runtime.Caching.dll'
which I understand even less.
The dotnet --info output is:
It was not possible to find any installed .NET Core SDKs Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: https://aka.ms/dotnet-download
Host (useful for support): Version: 3.0.0 Commit: 7d57652f33
.NET Core SDKs installed: No SDKs were found.
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
I tried installing the SDK but it didn't make any difference.
Answer
questions
davidfowl
What's installed on your production environment? Did you install the new hosting bundle?
Related questions