0
votes

I created a Web App on Azure portal, on runtime stack option I chose ".NET Core 3.0". When I import publish settings of this WebApp to VS2019, in Publish Profile summary I see "netstandard2.1".Is that normal, shouldn't it be 'netcoreapp3.0' ?

VS2019 publish profile settings

In AppService settings > Configuration > [tab] General settings:

Stack: .NET

.NET Framework version: V4.7

Azure WebApp settings

How is it possible? The app that I am deploying was created as Blazor WebAssembly App template (CLI: .NET Core 3.1.102)

1
If your stack says ".Net" and shows a Framework version, then it did not get created as a .Net Core app, but as a Framework app. It should list the Stack as ".NET Core" and no Framework. Either Azure messed up or you selected something by mistake. If you want to precreate the app on the portal (and not have VS do it), then I would suggest deleting and recreating this app again. Something is off.Bryan Lewis

1 Answers

0
votes

Right click your Blazor WebAssembly App and click Edit Project File.

Change

 <PropertyGroup>
    <TargetFramework>netstandard2.1</TargetFramework>
    <RazorLangVersion>3.0</RazorLangVersion>
 </PropertyGroup>

To

<PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

The target framework will turn to .net core, and republish the webapp.

enter image description here