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?
>Solution :
Here are some things you could try:
- Clear NuGet Cache:
dotnet nuget locals all --clearorTools > Options > NuGet Package Manager > General > Clear All NuGet Cache(s) - Check the project dependencies: Remove old versions if there are any
- Allow format selection: Go To:
Tools > Options > NuGet Package Manager > Package Managementand "Allow format selection on first package install". - 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!