Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure App Service hosted on .net 8 preview Linux does not start up, apparently asking for 8.0.0-rc to install

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

like image 820
YMC Avatar asked Oct 20 '25 00:10

YMC


1 Answers

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:

  • Open your project in Visual Studio, Right click on the Project solution=> Publish.
  • Create publish profile to deploy the project to Azure by selecting your .NET8 Linux Azure app service.
  • Before publishing the profile, click on Show all settings:

enter image description here

Change Deployment Mode from Framework-dependent to Self-Contained:

enter image description here

Publish the profile:

enter image description here

Response:

enter image description here

like image 133
Pravallika KV Avatar answered Oct 22 '25 18:10

Pravallika KV