Azure / Azure/azure-functions-core-tools
Creating new function targetting .NET 3.1 produces a v4 function targetting .NET 6
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
Running into an issue when creating a new .NET Function targetting .NET 3.1 where the function generated is requiring Functions SDK 4.0 and .NET 6.0. This is currently breaking Arc scenarios.
Using this docs as reference - https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-arc-cli?tabs=csharp%2Cbrowser
Commands used to reproduce:
func init LocalFunctionProj --dotnet --version 3.1
func new --name HttpExample --template "HTTP trigger" --authlevel "anonymous"
function.json:
{
"generatedBy": "Microsoft.NET.Sdk.Functions.Generator-4.0.1",
"configurationSource": "attributes",
"bindings": [
{
"type": "httpTrigger",
"methods": [
"get",
"post"
],
"authLevel": "anonymous",
"name": "req"
}
],
"disabled": false,
"scriptFile": "../bin/LocalFunctionProj.dll",
"entryPoint": "LocalFunctionProj.HttpExample.Run"
}
.csproj
**net6.0**
v3
PreserveNewest
PreserveNewest
Never
Output of func -v is 4.0.3971
Contributor guide
Assessment
This issue has not been assessed yet.