microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Microsoft.Graph 4.x References System.Net.Http.WinHttpHandler v6.0.1 which isn't available in .Net Framework 4.6.2
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Originally from Microsoft Support TrackingID #2208010010002604
Why is the assembly System.Net.Http.WinHttpHandler v6.0.1 required to be loaded with .Net framework 4.6.2 if this is not usable until .NET 5?
While compiling the app using SQL Server Integration Service 2019, which uses Visual Studio Tools for Applications, and Microsoft.Graph dotnet v4.x or higher we get the following error:
Could not load file or assembly 'System.Net.Http.WinHttpHandler, Version=6.0.0.1, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Due to the SSIS dependency, the target .NET framework is 4.7 (even in SSIS 2019) and the maximum targetable is 4.8. SSIS only allows referencing assemblies loaded through reflection from a local file path or registered in the local GAC.
This is not a problem with Microsoft.Graph dotnet v3.x
This is not a problem with Visual Studio 2019 or 2022 (This is probably because the nuget package is automatically installed with the package manager)
Based on the WinHttpHandler doc, this class is only available in System.Net.Http starting with .NET 5
https://docs.microsoft.com/en-us/dotnet/core/compatibility/networking/5.0/winhttphandler-removed-from-runtime
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="6.0.1" />
</ItemGroup>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj and its net462 System.Net.Http.WinHttpHandler 6.0.1 reference. Reproduce the assembly-loading failure in SQL Server Integration Services 2019 and Visual Studio Tools for Applications, then verify that the dependency can be resolved within the stated .NET Framework and SSIS constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100