Closed shivatyagi313 closed 11 months ago
@shivatyagi313 Is there any update on this?
From functions runtime docs I see that it needs an upgrade of the runtime to 4.x and there are some breaking changes between 3.x and 4.x https://learn.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=v4&pivots=programming-language-csharp#languages
From functions runtime docs I see that it needs an upgrade of the runtime to 4.x and there are some breaking changes between 3.x and 4.x https://learn.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=v4&pivots=programming-language-csharp#languages
Yes @ancaantochi , I tried updating the runtime from 3.0 to 4.0, and I was able to build the module as well, but the problem is that, it is not triggering, on arrival of new messages, after changing the target framework and runtime.
@shivatyagi313 Is there any update on this?
No updates yet @smondalgithub. Can you please check on this?
@ancaantochi can you please review this?
@shivatyagi313 Did you also update the edgehub binding (Microsoft.Azure.WebJobs.Extensions.EdgeHub) ? That also needs to be updated as it uses Microsoft.Azure.WebJobs 3.0.36. I see that 4.x version is Microsoft.Azure.WebJobs.Extensions, this package includes Microsoft.Azure.WebJobs: https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-get-started#install-webjobs-nuget-packages
Microsoft.Azure.WebJobs.Extensions.EdgeHub @ancaantochi , thanks for the reply, Yes I have updated all the nuget packages as per version 4.x. Still the modules are not triggering. Please help!
Do you have a fork where you made the changes, can you please send me a link? Also can you send the functions module logs?
Hi @ancaantochi , Thanks, but I don't see any errors when the modules are deployed and running, its just it doesn't trigger when it receives any new messages.
Only able to see the below in Iot hub -> module -> troubleshoot logs Hosting environment: Production Content root path: /azure-functions-host Now listening on: http://[::]:80 Application started. Press Ctrl+C to shut down.
It sounds like this is more a question of edgehub behavior, so feel free to re-open this thread in that repo if you are still running into issues here.
When I create a C# Azure Function IoT Edge Module, by default the target framework is netstandard2.0. The .csproj file of the module looks like this :
and the Dockerfile.amd64 looks like this :
This azure function requires .net SDK 3 to Build and Push. The function triggers and works fine when a new message is received.
I want the module to be build in .NET 6, so in order to do that I manually changed the target framework of the module to .net 6 upgraded all the nuGet packages, updated the Dockerfile.amd64 to .net sdk 6, so the module was build successfully but now it is not triggering when a new message is received.
Is is possible to upgrade the C# Azure function IoT edge module to work in .net6 framework? if yes, then what could be a good approach to make the module work in .net 6, as the way I tried is not working and does not looks like a good approach.