MichalJankowskii / Moq.EntityFrameworkCore

Library that provides methods that will help you with mocking EntityFrameworkCore.
MIT License
255 stars 28 forks source link

nuspec file different from what nuget org shows causing visual studio to download old moq version #42

Open SrChronus opened 2 weeks ago

SrChronus commented 2 weeks ago

Nuget.org states that the moq dependency is : Moq (>= 4.20.70) However, in the nuspec it is set to [dependency id="Moq" version="4.20.70" exclude="Build,Analyzers"]

This causes visualstudio 17.12.0 to require 4.20.70 which in our private feed is blocked for some reason.

Somehow this was not an issue with older visual studio releases and can be worked around by manually editing the nuspec file (which imo is not very desirable)

MichalJankowskii commented 2 weeks ago

Ok. I will check during weekend. I saw your PR

MichalJankowskii commented 2 weeks ago

Hi @SrChronus

Nuspec is correct. Entry should be read in the following way:

See more detail here: Package versioning

And here is a screen app that has everything updated to the latest version: nuget_latest

Could you describe in more detail what is blocked in your solution?

SrChronus commented 2 weeks ago

My issue is that the .net9 sdk (targetting .net 8) decides it needs to download moq 4.20.70 as a transient dependency of moq.EntityFrameworkCore. As this version is blocked in our feed I can no longer build unless I specifically set global.json to not use the .net9 sdk but use the .net8 sdk

SrChronus commented 2 weeks ago

This thread seems to show the same problem https://developercommunity.visualstudio.com/t/NuGet-Restore-restoring-old-versions-of/10791649

MichalJankowskii commented 5 days ago

This link is great. It presents that it is a bug on the VS side. Let's give them a moment to fix it.