Cannot publish web app to Azure Linux with aspnetcore v6 nuget packages

dobestar 6 Reputation points
2022-06-28T12:31:48.73+00:00

I have a Razor Pages project running on Azure web app service on Linux on .net 5. I have been using zip deployment to publish it without any problems. Now I want to upgrade to .net 6, so I have changed the .net version for the project, updated the nuget packages from 5 to v6, changed the target version in Azure to 6, changed the target version in the publish profile to v6, but whenever I try to publish it fails every time.

I have followed the required steps as outlined here

If I roll the entityframeworkcore packages back to v5 then it publishes ok.

The publish profile is framework-dependent. The only error message I get on publish is:

Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.

===================
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Publish\targets\PublishTargets\Microsoft.NET.Sdk.Publish.ZipDeploy.targets(55,5): Error : Zip Deployment failed. 3>Build failed. Check the Output window for more details. ========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,197 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,831 questions
{count} votes