Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Visual Studio 2022 pre-release nuget not used

I’m trying to use pre-release version of certain project (version 1.1.504-alpha-build-con-acc.5).

<PackageReference Include="ProjectX.Client" Version="[1.1.504-alpha-build-con-acc.5]" />

I’ve specified this version in project file and it seem to be installed correctly when checked in nuget manager.
When opening Interface i’m using from the project, there’s a version 1.1.504.0, which have been already released by another coworker.
According to https://learn.microsoft.com/en-us/nuget/concepts/package-versioning I’ve tried to specify the version with [] brackets, but it didn’t help.
Any ideas why VS is using different nuget version than specified?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Here are some things you could try:

  1. Clear NuGet Cache: dotnet nuget locals all --clear or Tools > Options > NuGet Package Manager > General > Clear All NuGet Cache(s)
  2. Check the project dependencies: Remove old versions if there are any
  3. Allow format selection: Go To: Tools > Options > NuGet Package Manager > Package Management and "Allow format selection on first package install".
  4. Use the Update-Package command: Use this command: Update-Package ProjectX.Client -Version 1.1.504-alpha-build-con-acc.5 -Reinstall

I hope this fixes your issue!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading