profile
viewpoint

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.

Annotation 2019-09-25 170442

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.

aspnet/AspNetCore

Answer questions davidfowl

What's installed on your production environment? Did you install the new hosting bundle?

useful!

Related questions

ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY when clean webapi template
MissingMethodException: Method not found Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
Migrate Asp.Net Core 2.2 Integration Tests to 3.0 - The TestServer constructor was not called with a IWebHostBuilder so IWebHost is not available. hot 4
UseStaticFiles with StaticFileOptions/FileExtensionContentTypeProvider breaks server side Blazor hot 3
HTTP Error 500.30 - ANCM In-Process Start Failure hot 3
With Asp.net core 3.0 SignInManager.IsSignedIn(User) allways reuturn false?but in 2.2 it works fine.Is that a debug? hot 3
CSS Isolation in Blazor Components hot 3
How to retrieve the HttpContext from Blazor server-side ? hot 3
Oauth2 authentication erroring with "The oauth state was missing or invalid." hot 3
Failed to gracefully shutdown application (IIS Hang) hot 3
BadHttpRequestException: Reading the request body timed out due to data arriving too slowly hot 2
HTTP Error 500.0 - ANCM In-Process Handler Load Failure hot 2
Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder`1.HasIndex(System.Linq.Expressions.Expression`1<System.Func`2<System.__Canon,System.Object>>)'. hot 2
MissingMethodException at SignInManager ctor after update hot 2
BadHttpRequestException: Reading the request body timed out due to data arriving too slowly hot 2
Github User Rank List