I am trying to deploy Azure functions using Azure DevOps. I have used terraform to create the required resources(Azure functions app) in Azure portal. As a next steps with the build and release pipeline I have deployed actual function code written in C#.
I am getting the below error:
Your app is pinned to an unsupported runtime version for 'dotnet'. For better performance, we recommend using one of our supported versions instead: ~3.
But when I create a function manually from the Azure portal I am not getting any warning.In this case also I am using Azure devops.
My build pipeline have simple tasks like selecting .NET core sdk(6.0.X) then dot net build using a *.csproj and archive and publish. These artifacts I am deploying in a release pipeline using Azure function task and selected deployment option as Zip deploy.
I tried both Zip deploy and Auto detect but both the cases I am getting the warning.
Why I am getting the warning? But for linux function I am not getting this kind of warning
.csproj
code:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.0" />
</ItemGroup>