Open yuryshev opened 2 months ago
Hi, what target framework are you using? Seems to work for me with a dotnet6.0 isolated function
Hmm... This is strange, first I tested on .net 6 and then switched to .net8 and there was still an error. I'll try to give more context.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Binance.Net" Version="9.8.1" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
public static class Function1
{
[FunctionName("Function1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req,
ILogger log)
{
return new OkResult();
}
}
So I checked this some more, seems it's only an issue when using non-isolated process. For dotnet-isolated runtime it works correctly. I would suggest switching to dotnet-isolated if possible as this is also the recommended runtime from MS.
For me this happened when i had mixed isolated/inproc usage in my code
Hello @JKorf ,
There is an issue with NuGet package version 9.7.0 and higher in Azure Functions projects. It generates the following error messages:
To reproduce this, create a default Azure Functions project and add the latest version of Binance.Net, then run the application.
The previous versions work well.
Thank you