Unable to update web settings for Function App

125 views Asked by At

I updated my function app from Function runtime v3, .NET core 3.1 to Function runtime v4 and .NET 6. I am encountering the following error every time I publish it. Everything still works though. If I deploy the old version of the function app. I don't see this error.

enter image description here

enter image description here

1

There are 1 answers

1
Vivek Vaibhav Shandilya On

Following steps Worked for me:

Make sure you are using Function Runtime version in the Azure is 4as shown below:

enter image description here

enter image description here

Install latest version of Azure Function Core tools. you can download it from here.

I have created a sample HTTP trigger.

Make sure correct version of .NET And Function Runtime is mentioned in the .csproj file:

.csprojfile:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.2.0" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>

#OUTPUT:

local:

enter image description here

enter image description here

enter image description here

#Azure enter image description here

enter image description here

Get the function url: enter image description here

enter image description here