HTTP Error 500.31 - Failed to load ASP.NET Core runtime - .NET 6.0

117 views Asked by At

I have upgraded my project from .NET Core 3.1 to .NET 6. After upgrading I am getting warning like

warning NETSDK1179: One of '--self-contained' or '--no-self -contained' options are required when '--runtime' is used

I don't want to deploy my code with this warning. I have added

<RuntimeIdentifiers>win81-x64;win7-x64;win10-x64</RuntimeIdentifiers>

in every .csproj and added

--self-contained true

to my dotnet publish command. But I am still getting those warnings.

I have installed the .NET 6 hosting bundle on my server. It helped to resolve my problem. But I can't install all the environment due to permission issue. If I deploy my code with the warning I am getting error.

Please help me resolve this warning

0

There are 0 answers