Reputation: 31
I recently purchased a 5$ Web Hosting Plan on interserver.net. Today I tried to publish my ASP.NET Core MVC application on the server using the Plesk interface. Then when I try to access my website, I get this error:
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found
I have already run the command dotnet --info
command and it shows .NET Core SDK 3.1 is installed:
Do you have any ideas about how to solve this issue?
This is what I get in the Stdout Log:
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.0.2' was not found.
- The following frameworks were found:
2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.17 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.2.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.2.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
So apparently I have to migrate my application to the .NET Core version indicated above?
Upvotes: 0
Views: 19382
Reputation: 31
Today I solved this issue with a self-contained publishment.
The output publishing folder contains all components of the app, including the .NET Core libraries and target runtime. The app is isolated from other .NET Core apps and doesn't use a locally installed shared runtime. The user of your app isn't required to download and install .NET Core.
For more info: https://learn.microsoft.com/en-GB/dotnet/core/deploying/#publish-self-contained
Upvotes: 3
Reputation: 341
Please check the event viewer for more information about the issue. I had the same error and event viewer showed the following error message : Could not find 'aspnetcorev2_inprocess.dll'. Exception message: Could not execute because the specified command or file was not found.
All the necessary dlls were already installed but i realized that i had recently dowloaded a new version of aspnet core dll. But somehow my application pool was not able to recognize it. So i recreated the Application Pool and it solved the issue for me.
Upvotes: 2