Skip to content

nuget package 1.21.2 causes conflicts in Solutions targeting .NET Framework 4.8 #24599

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

Open
rozeboosje opened this issue Apr 30, 2025 · 2 comments
Labels
api:CSharp issues related to the C# API .NET Pull requests that update .net code

Comments

@rozeboosje
Copy link

Describe the issue

In a Solution targeting .NET Framework 4.8 I updated Microsoft.ML.OnnxRuntime.Managed to 1.21.2

This adds a transitive package Microsoft.ML.OnnxRuntime build 1.21.0 (latest stable)

When I then try to build the Solution I get these warnings

There was a conflict between "Microsoft.ML.OnnxRuntime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=f27f157f0a5b7bb6" and "Microsoft.ML.OnnxRuntime, Version=1.20.1.0, Culture=neutral, PublicKeyToken=f27f157f0a5b7bb6".

To reproduce

Create a .NET Framework 4.8 Solution and include the latest nuget package 1.21.2 for Microsoft.ML.OnnxRuntime.Managed

Try to build.

Urgency

No response

Platform

Windows

OS Version

24H2

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.21.2

ONNX Runtime API

C#

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@github-actions github-actions bot added .NET Pull requests that update .net code api:CSharp issues related to the C# API labels Apr 30, 2025
@rozeboosje
Copy link
Author

Just wondering whether anyone has looked into this issue?

@rozeboosje
Copy link
Author

Hm.

Okay.... Progress report

I see a new nuget package has dropped for Microsoft.ML.OnnxRuntime.Managed, build 1.22.0

When I install that, the project builds again and it seems to work when I run the software after I build it.

One observation.

After installing Microsoft.ML.OnnxRuntime.Managed build 1.22.0 I see the Solution still has Transitive packages installed for Microsoft.ML.OnnxRuntime build 1.20.1

It works fine with that, but I see there is also a new package 1.22.0 for Microsoft.ML.OnnxRuntime

When I install that, it also works fine and it changes the Transitive packages to Top Level

Just wondering why Microsoft.ML.OnnxRuntime.Managed build 1.22.0 doesn't include Microsoft.ML.OnnxRuntime build 1.22.0 as a transitive package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:CSharp issues related to the C# API .NET Pull requests that update .net code
Projects
None yet
Development

No branches or pull requests

1 participant