Blog Post
Logic Apps Standard custom code now supports .NET 10
We have noticed the new template for Logic App with Custom Code has a number of differences vs what is provided in the instructions above - can you confirm if these should be applied to our existing code bases when upgrading?
- Program.cs file is added (I assume we use this instead of the StartupConfiguration/IConfigureStartup implementation to enable dependency injection)
- Additonal package references are added:
- <FrameworkReference Include="Microsoft.AspNetCore.App" /> (adding this then adds NU1510 warnings that
Microsoft.Extensions.Logging and Microsoft.Extensions.Logging.Abstractions will not be pruned and therefore their PackageReference item should be removed)
- <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
- <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
- <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.1.0" />
- Targets for workarounds:
- Workaround: FindFunctionJsonFolders expects the output directory to exist
- Workaround: Host resolves custom code from lib/custom/net472/ but build outputs to lib/custom/net10.0/. Copy published output to net472 folder as well so the host can find it.
Thanks for reporting. Extension version 5.1013.2 was pointing to an old version of the project template. The latest version of the template have the following fixes:
- Don't include Program.cs file (since the target of the project is a library not a program).
- Cleans the cs project removing not required references and post build target workarounds
- Uses the latest required SDKs (most notable is Microsoft.Azure.Workflow.Webjobs.Sdk to 1.4.1 - which also fixes the dependency injection issue that ronaldbosma raised).
Please check the latest version and let me know if you find any issues.