When I try to run my published app with "dotnet MyApp.dll" I get this error:
[santi@host test]$ dotnet MyApp.dll
Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. An internal error occurred.
(0x8007054F)
File name: 'Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.AspNetCore.Hosting.WebHostBuilderKestrelExtensions.<>c.<UseKestrel>b__0_0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass9_0.<ConfigureServices>b__0(WebHostBuilderContext context, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass10_0.<ConfigureServices>b__0(HostBuilderContext context, IServiceCollection builder)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at MyApp.Program.Main(String[] args)
Aborted (core dumped)
I've also tried with a self-contained publish and I still get the same error.
User contributions licensed under CC BY-SA 3.0