You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/dotnet-isolated-process-guide.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,7 @@ Placeholders are a platform capability that improves cold start. Normally, you d
229
229
230
230
- Set the `WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED` application setting to "1"
231
231
- Ensure that the `netFrameworkVersion` property of the function app matches your project's target framework, which must be .NET 6 or later.
232
+
- Ensure that the function app is configured to use a 64-bit process.
232
233
- Update your project file:
233
234
- Upgrade [Microsoft.Azure.Functions.Worker] to version 1.19.0 or later
234
235
- Upgrade [Microsoft.Azure.Functions.Worker.Sdk] to version 1.14.1 or later
@@ -239,11 +240,12 @@ Placeholders are a platform capability that improves cold start. Normally, you d
239
240
> [!NOTE]
240
241
> Setting `FunctionsEnableWorkerIndexing` to "True" may cause an issue when debugging locally using version 4.0.5274 or earlier of the [Azure Functions Core Tools](./functions-run-local.md). The issue manifests with the debugger not being able to attach. If you encounter this issue, remove the `FunctionsEnableWorkerIndexing` property during local testing.
241
242
242
-
The following CLI commands will set the application setting and update the `netFrameworkVersion` property. Replace `<groupName>` with the name of the resource group, and replace `<appName>` with the name of your function app. Replace `<framework>` with the appropriate version string, such as "v6.0" or "v7.0", according to your target .NET version.
243
+
The following CLI commands will set the application setting, update the `netFrameworkVersion` property, and make the app run as 64-bit. Replace `<groupName>` with the name of the resource group, and replace `<appName>` with the name of your function app. Replace `<framework>` with the appropriate version string, such as "v6.0" or "v7.0", according to your target .NET version.
243
244
244
245
```azurecli
245
246
az functionapp config appsettings set -g <groupName> -n <appName> --settings 'WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED=1'
246
247
az functionapp config set -g <groupName> -n <appName> --net-framework-version <framework>
248
+
az functionapp config set -g <groupName> -n <appName> --use-32bit-worker-process false
247
249
```
248
250
249
251
The following example shows a project file with the appropriate changes in place:
@@ -326,34 +328,42 @@ You can compile your function app as [ReadyToRun binaries](/dotnet/core/deployin
326
328
327
329
ReadyToRun requires you to build the project against the runtime architecture of the hosting app. **If these are not aligned, your app will encounter an error at startup.** Select your runtime identifier from the table below:
328
330
329
-
|Operating System | App is 32-bit | Runtime identifier |
331
+
|Operating System | App is 32-bit<sup>1</sup>| Runtime identifier |
330
332
|-|-|-|
331
333
| Windows | True |`win-x86`|
332
334
| Windows | False |`win-x64`|
333
335
| Linux | True | N/A (not supported) |
334
336
| Linux | False |`linux-x64`|
335
337
338
+
<sup>1</sup> Only 64-bit apps are eligible for some other performance optimizations such as [placeholders](#placeholders-preview).
339
+
336
340
To check if your Windows app is 32-bit or 64-bit, you can run the following CLI command, substituting `<group_name>` with the name of your resource group and `<app_name>` with the name of your application. An output of "true" indicates that the app is 32-bit, and "false" indicates 64-bit.
337
341
338
342
```azurecli
339
343
az functionapp config show -g <group_name> -n <app_name> --query "use32BitWorkerProcess"
340
344
```
341
345
342
-
To compile your project as ReadyToRun, update your project file by adding the `<PublishReadyToRun>` and `<RuntimeIdentifier>` elements. The following examples shows a configuration for publishing to a Windows 32-bit function app.
346
+
You can change your application to 64-bit with the following command, using the same substitutions:
347
+
348
+
```azurecli
349
+
az functionapp config set -g <group_name> -n <app_name> --use-32bit-worker-process false`
350
+
```
351
+
352
+
To compile your project as ReadyToRun, update your project file by adding the `<PublishReadyToRun>` and `<RuntimeIdentifier>` elements. The following examples shows a configuration for publishing to a Windows 64-bit function app.
343
353
344
354
```xml
345
355
<PropertyGroup>
346
356
<TargetFramework>net6.0</TargetFramework>
347
357
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
348
-
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
358
+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
349
359
<PublishReadyToRun>true</PublishReadyToRun>
350
360
</PropertyGroup>
351
361
```
352
362
353
-
If you don't want to set the `<RuntimeIdentifier>` as part of the project file, you can also configure this as part of the publish gesture itself. For example, with a Windows 32-bit function app, the .NET CLI command would be:
363
+
If you don't want to set the `<RuntimeIdentifier>` as part of the project file, you can also configure this as part of the publish gesture itself. For example, with a Windows 64-bit function app, the .NET CLI command would be:
354
364
355
365
```dotnetcli
356
-
dotnet publish --runtime win-x86
366
+
dotnet publish --runtime win-x64
357
367
```
358
368
359
369
In Visual Studio, the "Target Runtime" option in the publish profile should be set to the correct runtime identifier. If it is set to the default value "Portable", ReadyToRun will not be used.
0 commit comments