Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Last active December 7, 2021 10:32
Show Gist options
  • Save justinyoo/8fbd8f285c55a351be2cbf08d8119ce6 to your computer and use it in GitHub Desktop.
Save justinyoo/8fbd8f285c55a351be2cbf08d8119ce6 to your computer and use it in GitHub Desktop.
Migrating Azure Functions OpenAPI Extension to V4
<Project Sdk="Microsoft.NET.Sdk">
...
<ItemGroup>
<!-- .NET Core 2.1 or 3.1: In-process Worker -->
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.OpenApi" Version="1.0.0" />
</ItemGroup>
...
</Project>
<Project Sdk="Microsoft.NET.Sdk">
...
<ItemGroup>
<!-- .NET 5: Out-of-process Worker -->
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.0.0" />
</ItemGroup>
...
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Change these values -->
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<!-- To these values -->
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
...
</PropertyGroup>
...
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Change these values -->
<TargetFramework>net5.0</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<!-- To these values -->
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
...
</PropertyGroup>
...
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment