microsoftgraph/msgraph-sdk-dotnet-core

Microsoft.Graph Has A Nuget Dependency Incompatible With .NET 8

cdomino opened this issue · 2 comments

Please provide the following (and please check them off the list with [x]) before submitting this issue:

  • [ X] Expected behavior. Please provide links to the specific Microsoft Graph documentation you used to determine the expected behavior.
  • [X ] Actual behavior. Provide error codes, stack information, and a Fiddler capture of the request and response (please remove personally identifiable information before posting).
  • [ X] Steps to reproduce the behavior. Include your code, IDE versions, client library versions, and any other information that might be helpful to understand your scenario.

Expected behavior

I'm able to upgrade my project to .NET 8 with the latest MS Graph Core Nuget package.

Actual behavior

Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for System.Text.Json. Install/reference System.Text.Json 8.0.0 directly to project BlazorApp3 to resolve this issue.
BlazorApp3 -> BlazorApp3.Client -> Microsoft.AspNetCore.Components.WebAssembly 8.0.0 -> Microsoft.Extensions.Configuration.Json 8.0.0 -> System.Text.Json (>= 8.0.0)
BlazorApp3 -> Microsoft.Graph 5.34.0 -> Microsoft.Graph.Core 3.1.1 -> Microsoft.Kiota.Http.HttpClientLibrary 1.3.0 -> System.Text.Json (>= 6.0.0 && < 8.0.0). BlazorApp3 C:\Code\BlazorApp3\BlazorApp3\BlazorApp3\BlazorApp3.csproj 1

Steps to reproduce the behavior

  1. Upgrade Visual Studio 2022 v17.8.0.
  2. Install .NET 8.0.100 SDK (win x64)
  3. Create new Blazor WASM project using the VS template
  4. Add the Microsoft.Graph v5.34.0 Nuget package to the Server project

Thanks for your help on this! I also get the same error from a different project created in .NET 6 and upraded to .NET 7 before today:

Error NU1107 Version conflict detected for System.Diagnostics.DiagnosticSource. Install/reference System.Diagnostics.DiagnosticSource 8.0.0 directly to project MyExistingProject.Infrastructure.Common to resolve this issue.
MyExistingProject.Infrastructure.Common -> Microsoft.Extensions.Http 8.0.0 -> Microsoft.Extensions.Diagnostics 8.0.0 -> Microsoft.Extensions.Diagnostics.Abstractions 8.0.0 -> System.Diagnostics.DiagnosticSource (>= 8.0.0)
MyExistingProject.Infrastructure.Common -> Microsoft.Graph 5.34.0 -> Microsoft.Graph.Core 3.1.1 -> Microsoft.Kiota.Abstractions 1.6.1 -> System.Diagnostics.DiagnosticSource (>= 6.0.0 && < 8.0.0). MyExistingProject.Infrastructure.Common C:\Code\MyExistingProject\MyExistingProject.Infrastructure.Common\MyExistingProject.Infrastructure.Common.csproj 1

Thanks for raising this @cdomino

We're tracking this via microsoft/kiota-serialization-json-dotnet#105 and will close this as duplicate as we work to resolve this pretty soon.

Much appreciated @andrueastman!