Currently I am developing a azure function. I use Net6.0. I have multiple imports. At least one with ftp and one with http.
So I imported both packages via nuget. But if I start my function, the following error occurs:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=...'. The system cannot find the file specified.'`
This error is thrown because of a dependency of FluentFTP:
If I downgrade Microsoft.Extensions.Http to Version 6.0.0. The application starts without any error. Or, if I remove the Microsoft.Extensions.Http package, it also works (then the depency has version 2.2.0).
But why is this a problem with the newest version? Is there a way of using all packages with the newest version?

You are targeting
net6.0and theMicrosoft.Extensions.Httpdependency you are trying to install is meant fornet7.0.You can check that versions are named according to the .net version - https://www.nuget.org/packages/Microsoft.Extensions.Http/7.0.0#versions-body-tab
That is why you should use
Microsoft.Extensions.Httpversion6.0.0or below.