Skip to content

Commit 8e37a16

Browse files
committed
pr feedback
1 parent ee421df commit 8e37a16

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

articles/azure-functions/TOC.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,6 @@
547547
href: migrate-version-3-version-4.md
548548
- name: Migrate v1.x to v4.x
549549
href: migrate-version-1-version-4.md
550-
- name: Migrate extension versions
551-
items:
552-
- name: Migrate Azure Cosmos DB extension 3.x to 4.x
553-
href: migrate-cosmos-db-version-3-version-4.md
554550
- name: Monitor
555551
items:
556552
- name: Monitor function apps with Azure Monitor
@@ -760,6 +756,9 @@
760756
- name: Output
761757
href: functions-bindings-cosmosdb-v2-output.md
762758
displayName: Azure Cosmos DB
759+
- name: Migrate Azure Cosmos DB extension 3.x to 4.x
760+
href: migrate-cosmos-db-version-3-version-4.md
761+
displayName: Azure Cosmos DB
763762
- name: Azure Data Explorer
764763
items:
765764
- name: Overview

articles/azure-functions/migrate-cosmos-db-version-3-version-4.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ This article walks you through the process of migrating your function app to run
2727
|[In-process model](./functions-dotnet-class-library.md)|[Microsoft.Azure.WebJobs.Extensions.CosmosDB](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDB) |>= 4.3.0 |
2828
|[Isolated worker model](./dotnet-isolated-process-guide.md) |[Microsoft.Azure.Functions.Worker.Extensions.CosmosDB](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB)|>= 4.4.1 |
2929

30-
Update your `.csproj` project file to use the latest extension version. The following `.csproj` file uses version 4 of the Azure Cosmos DB extension in process with .NET 6 on Azure Functions runtime version 4.
30+
Update your `.csproj` project file to use the latest extension version for your process model. The following `.csproj` file uses version 4 of the Azure Cosmos DB extension.
31+
32+
### [In-process model](#tab/in-process)
3133

3234
```xml
3335
<Project Sdk="Microsoft.NET.Sdk">
3436
<PropertyGroup>
35-
<TargetFramework>net6.0</TargetFramework>
37+
<TargetFramework>net7.0</TargetFramework>
3638
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
3739
</PropertyGroup>
3840
<ItemGroup>
@@ -51,6 +53,34 @@ Update your `.csproj` project file to use the latest extension version. The foll
5153
</Project>
5254
```
5355

56+
### [Isolated worker model](#tab/isolated-worker)
57+
58+
```xml
59+
<Project Sdk="Microsoft.NET.Sdk">
60+
<PropertyGroup>
61+
<TargetFramework>net7.0</TargetFramework>
62+
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
63+
<OutputType>Exe</OutputType>
64+
</PropertyGroup>
65+
<ItemGroup>
66+
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.14.1" />
67+
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.CosmosDB" Version="4.4.1" />
68+
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.10.0" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<None Update="host.json">
72+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
73+
</None>
74+
<None Update="local.settings.json">
75+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
76+
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
77+
</None>
78+
</ItemGroup>
79+
</Project>
80+
```
81+
82+
---
83+
5484
::: zone-end
5585
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-java,programming-language-powershell"
5686

@@ -76,7 +106,7 @@ To update your application to use the latest extension bundle, update your `host
76106

77107
## Rename the binding attributes
78108

79-
Both [in-process](functions-dotnet-class-library.md) and [isolated process](dotnet-isolated-process-guide.md) C# libraries use the [CosmosDBTriggerAttribute](https://github.com/Azure/azure-webjobs-sdk-extensions/blob/master/src/WebJobs.Extensions.CosmosDB/Trigger/CosmosDBTriggerAttribute.cs) to define the function. C# script instead uses a function.json configuration file as described in the [C# scripting guide](./functions-reference-csharp.md#cosmos-db-trigger).
109+
Both [in-process](functions-dotnet-class-library.md) and [isolated process](dotnet-isolated-process-guide.md) C# libraries use the [CosmosDBTriggerAttribute](https://github.com/Azure/azure-webjobs-sdk-extensions/blob/master/src/WebJobs.Extensions.CosmosDB/Trigger/CosmosDBTriggerAttribute.cs) to define the function.
80110

81111
The following table only includes attributes that were renamed or were removed from the version 3 extension. For a full list of attributes available in the version 4 extension, visit the [attribute reference](./functions-bindings-cosmosdb-v2-trigger.md?tabs=extensionv4#attributes).
82112

0 commit comments

Comments
 (0)