0

I need to use to use two packages Package1 & Package2 both in same project (same .csproj file)

But both need different version of Bond.Core.CSharp how do i use both packages. Dependency is like:

Package1 -> dependency -> dependency -> dependency -> Bond.Runtime.Csharp 9.0.3-> Bond.Core.CSharp 9.0.3

Package2 -> dependency -> Bond.Runtime.Csharp 9.0.3-> Bond.Core.CSharp 9.0.3

<PackageReference Include="Package1" Version=.. /> 
   expect "Bond.Core.CSharp" Version="9.0.1"

<PackageReference Include="Package2" Version=.. /> 
   expect "Bond.Core.CSharp" Version="9.0.3" />

TargetFrameWork = .Net Framework 4.7.2

1
  • 2
    I'd expect dependency resolution to handle this automatically and resolve to 9.0.3. If you could provide a minimal reproducible example so we could reproduce the problem, it would make it easier to help you. Commented Jun 28, 2022 at 13:29

1 Answer 1

2

If the first package requires 9.0.1 and the second 9.0.3, you can try requiring directly version 9.0.3 in you project. I would expect Package1 to be fine with the version you are already requiring.

In other words, add a PackageReference for the desired version of Bond.Runtime.Csharp in order to ease the resolution of conflicts.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.