7

I don’t see .NET 7 Isolated as an option when I try to create a new Azure Functions app in Visual Studio 17.4 (Windows version).

Any idea why?

Sam
  • 26,817
  • 58
  • 206
  • 383

1 Answers1

9

To use the Isolated model, you shall set your environment variable FUNCTIONS_WORKER_RUNTIME to dotnet-isolated and use these NuGet packages:

  • Microsoft.Azure.Functions.Worker
  • Microsoft.Azure.Functions.Worker.Sdk

More info here and especially here, where you can find lot of samples (with .NET7 too!)

Krusty
  • 955
  • 1
  • 12
  • 26
  • 2
    Is it even possible to create the template with visual studio? This answer is not helping me so far as I get "There is no Functions runtime available that matches the version specified in the project" – Norbert Huurnink Feb 16 '23 at 14:55
  • @NorbertHuurnink I can't see the option for dotnet7 in template creation, but you can choose the `dotnet6 (Isolated)` one and then manually upgrade the csproj to `net7.0` – Krusty Feb 22 '23 at 20:39
  • @Krusty when I do that (manually upgrade to net7.0) I get a build error "Invalid combination of TargetFramework and AzureFunctionsVersion is set" – Alain Mar 10 '23 at 16:46
  • @Alain Does your csproj file target both v4 function version and net7? `net6.0 v4` – Krusty Mar 26 '23 at 23:13
  • Any updates on this? I also cannot see any options to create a .NET 7 Azure Function in Visual Studio 17.5.4 and I have the latest Azure Functions Core tools and .NET 7 SDK installed. – Oliver Nilsen Apr 25 '23 at 11:15
  • @OliverNilsen I can see the option now `.NET 7.0 Isolated` under `Functions worker` menu – Krusty Apr 25 '23 at 21:50