Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, September 30, 2019 9:29 PM
Hi,
When creating a new Azure Web App Service, I am trying to determine what option to choose from the "Runtime Stack" dropdown.
My new ASP.NET project is a .NET Core 2.2 app. Looking at our two other existing Web Apps hosted on Azure, I see that they use the "ASP.NET v4.7" runtime stack even though they are .NET Core 2.2 apps. They both run just fine and I don't recall why we chose that stack.
If I have a ASP.NET project that has a TargetFramework of "netcoreapp2.2", should I choose ".NET Core 2.2" or "ASP.NET v4.7" as my runtime stack?
Thanks.
All replies (3)
Tuesday, October 1, 2019 11:23 AM
Hi Tod,
ASP.NET Core 2.x can target .NET Core or .NET Framework. ASP.NET Core apps targeting .NET Framework aren't cross-platform—they run on Windows only. Generally, ASP.NET Core 2.x is made up of .NET Standard libraries. Libraries written with .NET Standard 2.0 run on any .NET platform that implements .NET Standard 2.0.
ASP.NET Core 2.x is supported on .NET Framework versions that implement .NET Standard 2.0.
So I would suggest using .NET Core 2.2 as your runtime stack for your ASP.NET project.
You can Read this documentation for more information:Choose between ASP.NET 4.x and ASP.NET Core.
Hope that helps. Please let us know if you have additional questions.
Thanks,
Grace
Thursday, October 3, 2019 6:32 PM
Hi Grace,
Thanks for taking the time to respond. Unfortunately, I am still unclear why I would choose the .NET Core 2.2 runtime stack over the ASP.NET 4.7 runtime stack. I did an experiment of creating two Web App Services (one for each runtime). Both worked (seemingly the same), but when I published to the .NET Core 2.2 runtime app I would always get the following warning message:
"There was a problem starting MyProjectName on MyWebAppServiceName. Your application requires the .NET Core 2.2.0 runtime, but Microsoft Azure App Service only support the following versions:.
One way to fix this problem is by changing the deployment mode to self-contained in the publish settings, which will allow the application to carry its own runtime."
Note that warning message does not actually show what runtime versions are supported by MS Azure App Service. Sigh.
So, rather then spend more time trying to figure out how to get rid of a warning message, I went with ASP.NET 4.7 runtime stack.
Hopefully this thread will help someone else.
Wednesday, October 30, 2019 6:00 PM
Hi Tod,
Thanks for sharing the solution that worked for you. I am sure this information will be helpful to the rest of the community.
Grace