Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 conflict System.Text.Json #2214

Closed
martinsura opened this issue Nov 14, 2023 · 7 comments
Closed

.NET 8 conflict System.Text.Json #2214

martinsura opened this issue Nov 14, 2023 · 7 comments
Labels

Comments

@martinsura
Copy link

Describe the bug
Hi,

After upgrading project to .NET8 RTM got error

Error NU1107 : Version conflict detected for System.Text.Json. Install/reference System.Text.Json 8.0.0 directly to project [Project] to resolve this issue. 
 [Project] -> Microsoft.EntityFrameworkCore.Design 8.0.0 -> Microsoft.Extensions.DependencyModel 8.0.0 -> System.Text.Json (>= 8.0.0) 
 [Project] -> Microsoft.Graph 5.32.0 -> Microsoft.Graph.Core 3.1.0 -> Microsoft.Kiota.Http.HttpClientLibrary 1.2.0 -> System.Text.Json (>= 6.0.0 && < 8.0.0).

To Reproduce


<Project Sdk="Microsoft.NET.Sdk.Web">

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <Nullable>disable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
    </PropertyGroup>

    <ItemGroup>
... etc
        <PackageReference Include="Microsoft.Graph" Version="5.32.0"/>
    </ItemGroup>
</Project>

Expected behavior
Build success without error

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.0
@maxxacb
Copy link

maxxacb commented Nov 15, 2023

This extends beyond just System.Text.Json, I am also seeing a conflict in System.Diagnostics.DiagnosticSource when trying to update to .NET 8.

[Project]: Error NU1107 : Version conflict detected for System.Diagnostics.DiagnosticSource. Install/reference System.Diagnostics.DiagnosticSource 8.0.0 directly to project [Project] to resolve this issue. 
[Project] -> Microsoft.Extensions.Http.Polly 8.0.0 -> 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) 
[Project] -> 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).
1>------- Finished building project: [Project]. Succeeded: False. Errors: 1. Warnings: 1

This is on Windows 10 Enterprise, Version 22H2. Trying to add an explicit reference to version 8.0.0 of System.Diagnostics.DiagnosticSource fails when going through Rider's NuGet tool. I can manually add the reference in the csproj file and then run into the issue with System.Text.Json.

edit: Looks like Microsoft.Kiota.Abstractions has an open issue for the DiagnosticsSource upgrade microsoft/kiota-dotnet#149

@markushaslinger
Copy link

Kiota update is out, so I hope this will follow soon.

@h3rmanj
Copy link

h3rmanj commented Nov 15, 2023

Microsoft.Kiota.Abstractions is not enough

Microsoft.Kiota.Authentication.Azure
Microsoft.Kiota.Http.HttpClientLibrary
Microsoft.Kiota.Serialization.Json

Is needed as well. Once those are in place, Microsoft.Graph.Core can be updated, followed by Microsoft.Graph.

@andrueastman
Copy link
Member

Closed via microsoftgraph/msgraph-sdk-dotnet-core#771

@jeffpardy
Copy link

@andrueastman do we still need a release here so that we pick up version 3.1.2 of Microsoft.Graph.Core?

@SeeUnsharp
Copy link

@jeffpardy I installed 3.1.2 Microsoft.Graph.Core Nuget next to Microsoft.Graph 5.34.0 and it seems to work for now.

@andrueastman
Copy link
Member

As confirmed by @SeeUnsharp you can simply pull 3.1.2 Microsoft.Graph.Core. We will be releasing a new version of Microsoft.Graph that pulls this version soon after we close #2213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants