Skip to content

Commit fb13856

Browse files
author
ecfan
committed
Restore custom code doc
1 parent 04f9225 commit fb13856

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

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

Lines changed: 8 additions & 23 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: 06/10/2024
9+
ms.date: 10/16/2023
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,12 +46,7 @@ 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 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).
49+
- The custom functions capability currently supports calling only .NET Framework 4.7.2 assemblies.
5550

5651
- A local folder to use for creating your code project
5752

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

7469
:::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.":::
7570

76-
1. From the
77-
7871
1. In the **Select folder** box, browse to and select the local folder that you created for your project.
7972

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

8881
:::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.":::
8982

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

9485
| Item | Example value |
9586
|------|---------------|
96-
| Function name for your functions project | **WeatherForecast** |
97-
| Namespace name for your functions project | **Contoso.Enterprise** |
87+
| Function name for functions project | **WeatherForecast** |
88+
| Namespace name for functions project | **Contoso.Enterprise** |
9889
| Workflow template: <br>- **Stateful Workflow** <br>- **Stateless Workflow** | **Stateful Workflow** |
9990
| Workflow name | **MyWorkflow** |
10091

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

242233
## Compile and build your code
243234

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.
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.
245236

246237
1. In Visual Studio Code, from the **Terminal** menu, select **New Terminal**.
247238

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

264255
1. Confirm that the following items exist in your logic app project:
265256

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**.
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**.
267258

268259
- 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.
269260

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

354345
## Deploy your code
355346

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).
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).
363348

364349
## Troubleshoot problems
365350

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

380365
### Package not imported correctly
381366

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.
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.
383368

384369
`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]`
385370

0 commit comments

Comments
 (0)