Finally App Service can run on .NET 8 Preview under Linux container (Windows is not supported yet). I created one and deployed a simple app, but container does not start, saying the following:
2023-09-17T20:25:27.314076959Z The following frameworks were found:
2023-09-17T20:25:27.314080459Z 8.0.0-preview.7.23375.6 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
2023-09-17T20:25:27.314084859Z
2023-09-17T20:25:27.314088060Z Learn more:
2023-09-17T20:25:27.314103160Z https://aka.ms/dotnet/app-launch-failed
2023-09-17T20:25:27.314106760Z
2023-09-17T20:25:27.314110060Z To install missing framework, download:
2023-09-17T20:25:27.314113460Z https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0-rc.1.23419.4&arch=x64&rid=linux-x64&os=debian.12
2023-09-17T20:25:28.143Z ERROR - Container mytestsite_0_6514069e for site mytestsite has exited, failing site start
2023-09-17T20:25:28.165Z ERROR - Container mytestsite_0_6514069e didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2023-09-17T20:25:28.168Z INFO - Stopping site mytestsite because it failed during startup.
Similar stuff in app logs (though all shown in green, "Ok"):
2023-09-17T20:05:29.1782264 Trying to find the startup DLL name...
2023-09-17T20:05:29.1785581 Found the startup D name: Test.Api.dll
2023-09-17T20:05:29.1786987 Running the command: dotnet "Test.Api.dll"
2023-09-17T20:05:29.2267788 You must install or update .NET to run this application.
2023-09-17T20:05:29.2268172 App: /home/site/wwwroot/Test.Api.dll
2023-09-17T20:05:29.226821 Architecture: x64
2023-09-17T20:05:29.227199 Framework: 'Microsoft.NETCore.App', version '8.0.0-rc.1.23419.4' (x64)
2023-09-17T20:05:29.227326 .NET location: /usr/share/dotnet/
I replaced reference to rc
packages by preview
packages like 8.0.0-preview.7.23375.9
in my app, but it did not help, same error.
I wonder if I can manually install that 8.0.0-rc.1.23419.4 to the Linux machine, and also why could it ask for it as there is no direct dependency declared in the Visual Studio project file. There is a file created during the publish process called Test.Api.runtimeconfig.json and it points to 8.0.0-rc, but I'm not sure how it's created and managed, inside the file:
{
"name": "Microsoft.AspNetCore.App",
"version": "8.0.0-rc.1.23421.29"
}
I think there 2 ways to fix it: 1) install 8.0.0-rc to the Linux box manually or 2) update github yml script somehow to instruct it to install that specific ver of .net to the Linux box before the build action
When I tried to deploy my sample .NET 8 web app
to Linux Azure App Service(.NET8)
through visual studio
, I was facing the same issue.
Try below steps to fix this error:
Project solution=> Publish
.Show all settings
:Change Deployment Mode from Framework-dependent to Self-Contained:
Publish the profile:
Response:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With