An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
Hello @Haris Papageorge ,
adding an Azure Function using the azure portal editor can b a challenge.
When possible, use the template projects using either Visual Studio or VS Code.
It seems you are missing the much needed Nuget package references.
There are normally part of the project file. In the Azure Function portal, this file is omitted.
Still, you can add it by hand...
I added this 'function.csproj' file by uploaded it from disk:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Devices" Version="1.36.0" />
</ItemGroup>
</Project>
Note: make sure the file actually has this text.
See, the Nuget package for IoT devices is added.
Try to recompile your function again:
If compilation does not complete successfully, consider again to work with the more mature project templates.