C
C#β€’4w ago
Ice_trooper

Why can't I install this NuGet package

I don't unserstand why can't I install nuget package Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing v1.1.1 when I got already installed in another project: Microsoft.CodeAnalysis.CSharp.Workspaces v4.9.2
No description
18 Replies
Ice_trooper
Ice_trooperβ€’4w ago
What is wrong here?
Install failed (project: Sequencer.PrimeTween.ActionsGenerator.Tests, package: Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing v1.1.1) Package restore failed. Rolling back package changes for 'Sequencer.PrimeTween.ActionsGenerator.Tests'. Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 4.9.2 directly to project Sequencer.PrimeTween.ActionsGenerator.Tests to resolve th ... neration -> Microsoft.CodeAnalysis.CSharp 4.9.2 -> Microsoft.CodeAnalysis.Common (= 4.9.2) Sequencer.PrimeTween.ActionsGenerator.Tests -> Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing 1.1.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0).
Install failed (project: Sequencer.PrimeTween.ActionsGenerator.Tests, package: Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing v1.1.1) Package restore failed. Rolling back package changes for 'Sequencer.PrimeTween.ActionsGenerator.Tests'. Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 4.9.2 directly to project Sequencer.PrimeTween.ActionsGenerator.Tests to resolve th ... neration -> Microsoft.CodeAnalysis.CSharp 4.9.2 -> Microsoft.CodeAnalysis.Common (= 4.9.2) Sequencer.PrimeTween.ActionsGenerator.Tests -> Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing 1.1.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0).
Pobiega
Pobiegaβ€’4w ago
read the error message
Ice_trooper
Ice_trooperβ€’4w ago
Yeah, I was pasting it right now ;p
Pobiega
Pobiegaβ€’4w ago
it literally says..
Version conflict detected for Microsoft.CodeAnalysis.Common.
Ice_trooper
Ice_trooperβ€’4w ago
wait a sec, I checked this
Pobiega
Pobiegaβ€’4w ago
installing that version of the package would create a version conflict thats why it refuses to do it
Ice_trooper
Ice_trooperβ€’4w ago
No description
Ice_trooper
Ice_trooperβ€’4w ago
How to read it differently than >= (above) 3.8.0 I would understand if it was =, but it is above 3.8.0 so how to read this initial error, if I checked this and it should work
Pobiega
Pobiegaβ€’4w ago
its not conflicting with Workspaces Microsoft.CodeAnalysis.Common (= 3.8.0). Microsoft.CodeAnalysis.Common 4.9.2 do you see the problem?
Ice_trooper
Ice_trooperβ€’4w ago
I can see that, but I still don't understand it. After all, if Testing requires a version above 3.8.0, and it has version 4.9.2 then theoretically Testing should take Workspaces version 4.9.2 and thus CodeAnalysis.Common version 4.9.2
No description
Ice_trooper
Ice_trooperβ€’4w ago
I understand that Workspaces 3.8.0 requires Common 3.8.0 but why does it takes Workspaces 3.8.0 in the first place?
Pobiega
Pobiegaβ€’4w ago
dunno, but does >= really allow jumping up a major version? I assume it respects semver to some capacity meaning it will allow the greatest 3.x, but not a 4.x
Ice_trooper
Ice_trooperβ€’4w ago
and this is the question, hah πŸ˜„ Unfortunately I don't have much experience with nuget packages, but as I see >= I thought it worked even with the major version. I can check that
Pobiega
Pobiegaβ€’4w ago
considering major implies a breaking change, it would be weird to "allow" it
Ice_trooper
Ice_trooperβ€’4w ago
I will check 3.11 now
Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 3.11.0 directly to project Sequencer.PrimeTween.ActionsGenerator.Tests to resolve t ... ration -> Microsoft.CodeAnalysis.CSharp 3.11.0 -> Microsoft.CodeAnalysis.Common (= 3.11.0) Sequencer.PrimeTween.ActionsGenerator.Tests -> Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing 1.1.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0).
Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 3.11.0 directly to project Sequencer.PrimeTween.ActionsGenerator.Tests to resolve t ... ration -> Microsoft.CodeAnalysis.CSharp 3.11.0 -> Microsoft.CodeAnalysis.Common (= 3.11.0) Sequencer.PrimeTween.ActionsGenerator.Tests -> Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing 1.1.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0).
Stil nothing ;-; Is this normal behavior? Maybe it just shouldn't work that way, but in my Rider it works that way?
Pobiega
Pobiegaβ€’4w ago
Β―\_(ツ)_/Β―
Ice_trooper
Ice_trooperβ€’4w ago
So it wasn't as stupid question as I thought πŸ˜›
Pobiega
Pobiegaβ€’4w ago
nah dependency nightmares are real πŸ™‚