Skip to content

Commit 089a35a

Browse files
author
ecfan
committed
Add info about .NET 8 support
1 parent 811e136 commit 089a35a

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

articles/logic-apps/create-run-custom-code-functions.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.suite: integration
66
ms.reviewer: estfan, kewear, azla
77
ms.topic: how-to
88
ms.custom: devx-track-dotnet
9-
ms.date: 10/16/2023
9+
ms.date: 06/10/2024
1010
# Customer intent: As a logic app workflow developer, I want to write and run my own .NET Framework code to perform custom integration tasks.
1111
---
1212

@@ -46,7 +46,12 @@ For more information about limitations in Azure Logic Apps, see [Limits and conf
4646

4747
- The custom functions capability is currently available only in Visual Studio Code, running on a Windows operating system.
4848

49-
- The custom functions capability currently supports calling only .NET Framework 4.7.2 assemblies.
49+
- The custom functions capability currently supports calling the following assemblies:
50+
51+
- Azure-hosted logic app workflows: .NET Framework and .NET 8
52+
- Linux-hosted containers: Netcore and .NET 8
53+
54+
To use .NET 8, make sure that you have the [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet). For more information, see [Overview for .NET 8](/dotnet/core/whats-new/dotnet-8/overview).
5055

5156
- A local folder to use for creating your code project
5257

@@ -68,6 +73,8 @@ The latest Azure Logic Apps (Standard) extension for Visual Studio Code includes
6873

6974
:::image type="content" source="media/create-run-custom-code-functions/create-workspace.png" alt-text="Screenshot shows Visual Studio Code, Azure window, Workspace section toolbar, and selected option for Create new logic app workspace.":::
7075

76+
1. From the
77+
7178
1. In the **Select folder** box, browse to and select the local folder that you created for your project.
7279

7380
1. When the **Create new logic app workspace** prompt box appears, provide a name for your workspace:
@@ -80,12 +87,14 @@ The latest Azure Logic Apps (Standard) extension for Visual Studio Code includes
8087

8188
:::image type="content" source="media/create-run-custom-code-functions/project-template.png" alt-text="Screenshot shows Visual Studio Code with prompt to select project template for logic app workspace.":::
8289

90+
1. For Azure-hosted Standard logic app workflows, follow the prompt to select either **.NET Framework** or **.NET 8**.
91+
8392
1. Follow the subsequent prompts to provide the following example values:
8493

8594
| Item | Example value |
8695
|------|---------------|
87-
| Function name for functions project | **WeatherForecast** |
88-
| Namespace name for functions project | **Contoso.Enterprise** |
96+
| Function name for your functions project | **WeatherForecast** |
97+
| Namespace name for your functions project | **Contoso.Enterprise** |
8998
| Workflow template: <br>- **Stateful Workflow** <br>- **Stateless Workflow** | **Stateful Workflow** |
9099
| Workflow name | **MyWorkflow** |
91100

@@ -232,7 +241,7 @@ This example continues with the sample code without any changes.
232241

233242
## Compile and build your code
234243

235-
After you finish writing your code, compile to make sure that no build errors exist. Your function project automatically includes build tasks, which compile and then add your code to the **lib\custom** folder in your logic app project where workflows look for custom functions to run. These tasks put the assemblies in the **lib\custom\net472** folder.
244+
After you finish writing your code, compile to make sure that no build errors exist. Your function project automatically includes build tasks, which compile and then add your code to the **lib\custom** folder in your logic app project where workflows look for custom functions to run. These tasks put the assemblies in the **lib\custom\net472** or **lib\custom\net8** folder, based on your .NET version.
236245

237246
1. In Visual Studio Code, from the **Terminal** menu, select **New Terminal**.
238247

@@ -254,7 +263,7 @@ After you finish writing your code, compile to make sure that no build errors ex
254263

255264
1. Confirm that the following items exist in your logic app project:
256265

257-
- In your workspace, expand the following folders: **LogicApp** > **lib\custom** > **net472**. Confirm that the subfolder named **net472** contains the multiple assembly (DLL) files required to run your code, including a file named **<*function-name*>.dll**.
266+
- In your workspace, expand the following folders: **LogicApp** > **lib\custom** > **net472** or **net8**, based on your .NET version. Confirm that the subfolder named **net472** or **net8**, respectively, contains the assembly (DLL) files required to run your code, including a file named **<*function-name*>.dll**.
258267

259268
- In your workspace, expand the following folders: **LogicApp** > **lib\custom** > **<*function-name*>**. Confirm that the subfolder named **<*function-name*>** contains a **function.json** file, which includes the metadata about the function code that you wrote. The workflow designer uses this file to determine the necessary inputs and outputs when calling your code.
260269

@@ -344,7 +353,13 @@ After you confirm that your code compiles and that your logic app project contai
344353

345354
## Deploy your code
346355

347-
You can deploy your custom functions in the same way that you deploy your logic app project. Whether you deploy from Visual Studio Code or use a CI/CD DevOps process, make sure that you build your code and that all dependent assemblies exist in the logic app project's **lib/custom/net472** folder before you deploy. For more information, see [Deploy Standard workflows from Visual Studio Code to Azure](create-single-tenant-workflows-visual-studio-code.md#deploy-azure).
356+
You can deploy your custom functions in the same way that you deploy your logic app project. Whether you deploy from Visual Studio Code or use a CI/CD DevOps process, make sure that you build your code and that all dependent assemblies exist in the following logic app project folder before you deploy:
357+
358+
- .NET 4.7.2: **lib/custom/net472** folder
359+
360+
- .NET 8: **lib/custom/net8** folder
361+
362+
For more information, see [Deploy Standard workflows from Visual Studio Code to Azure](create-single-tenant-workflows-visual-studio-code.md#deploy-azure).
348363

349364
## Troubleshoot problems
350365

@@ -364,7 +379,7 @@ To fix this problem, from the **Run and Debug** list, select **Attach to logic a
364379

365380
### Package not imported correctly
366381

367-
If the Output window shows an error similar to the following message, make sure that you have .NET 6.0 installed. If you have this version installed, try uninstalling and then reinstalling.
382+
If the Output window shows an error similar to the following message, make sure that you have at least .NET 6.0 installed. If you have this version installed, try uninstalling and then reinstalling.
368383

369384
`C:\Users\yourUserName\.nuget\packages\microsoft.net.sdk.functions\4.2.0\build\Microsoft.NET.Sdk.Functions.targets(83,5): warning : The ExtensionsMetadataGenerator package was not imported correctly. Are you missing 'C:\Users\yourUserName\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\4.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets' or 'C:\Users\yourUserName\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\4.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.props'? [C:\Desktop\...\custom-code-project\MyLogicAppWorkspace\Function\WeatherForecast.csproj] WeatherForecast -> C:\Desktop\...\custom-code-project\MyLogicAppWorkspace\Function\\bin\Debug\net472\WeatherForecast.dll C:\Users\yourUserName\.nuget\packages\microsoft.net.sdk.functions\4.2.0\build\Microsoft.NET.Sdk.Functions.Build.targets(32,5): error : It was not possible to find any compatible framework version [C:\Desktop\...\custom-code-project\MyLogicAppWorkspace\Function\WeatherForecast.csproj] C:\Users\yourUserName\.nuget\packages\microsoft.net.sdk.functions\4.2.0\build\Microsoft.NET.Sdk.Functions.Build.targets(32,5): error : The specified framework 'Microsoft.NETCore.App', version '6.0.0' was not found. [C:\Desktop\...\custom-code-project\MyLogicAppWorkspace\Function\WeatherForecast.csproj] C:\Users\yourUserName\.nuget\packages\microsoft.net.sdk.functions\4.2.0\build\Microsoft.NET.Sdk.Functions.Build.targets(32,5): error : - Check application dependencies and target a framework version installed at: [C:\Desktop\...\custom-code-project\MyLogicAppWorkspace\Function\WeatherForecast.csproj]`
370385

0 commit comments

Comments
 (0)