Paket could not resolve package version even though it exists in available versions
See original GitHub issueDescription
Within our windows installers, we use MahApps.Metro.Resources package
In paket.dependencies
, we have
nuget MahApps.Metro.Resources 0.4.0.0 framework: >= net45
but when updating another package (in this case, Fody
), paket says that it cannot resolve this version of the package, even though it is listed in the available versions.
.\.paket\paket.exe update nuget Fody version 1.29.4
Paket version 5.0.0-alpha020
Updating Fody to version 1.29.4 in C:\Users\russ\source\windows-installers\paket.dependencies group Main
Resolving packages for group Main:
- Fody is pinned to 1.29.4
- reactiveui is pinned to 6.3.1
- reactiveui-core is pinned to 6.3.1
- reactiveui-events is pinned to 6.3.1
- FluentValidation is pinned to 5.5.0.0
- YamlDotNet is pinned to 3.8.0
- Topshelf is pinned to 3.1.4
- ILMerge is pinned to 2.14.1208
- Rx-Core is pinned to 2.2.5
- Rx-Interfaces is pinned to 2.2.5
- Rx-Linq is pinned to 2.2.5
- Rx-Main is pinned to 2.2.5
- Rx-PlatformServices is pinned to 2.2.5
- Rx-XAML is pinned to 2.2.5
- Splat is pinned to 1.6.0
- Costura.Fody is pinned to 1.3.3.0
- WindowsAPICodePack-Core is pinned to 1.1.1
- WindowsAPICodePack-Shell is pinned to 1.1.1
- HtmlTextBlock is pinned to 1.0.1
- MahApps.Metro is pinned to 1.0.1-ALPHA027
- MahApps.Metro.Resources is pinned to 0.4.0.0
Paket failed with:
There was a version conflict during package resolution.
Resolved packages:
- Costura.Fody 1.3.3.0
- FluentValidation 5.5.0.0
- Fody 1.29.4
- HtmlTextBlock 1.0.1
- ilmerge 2.14.1208
- MahApps.Metro 1.0.1-ALPHA027
- reactiveui 6.3.1
- reactiveui-core 6.3.1
- reactiveui-events 6.3.1
- Rx-Core 2.2.5
- Rx-Interfaces 2.2.5
- Rx-Linq 2.2.5
- Rx-Main 2.2.5
- Rx-PlatformServices 2.2.5
- Rx-Xaml 2.2.5
- Splat 1.6.0
- Topshelf 3.1.4
- WindowsAPICodePack-Core 1.1.1
- WindowsAPICodePack-Shell 1.1.1
- YamlDotNet 3.8.0
Could not resolve package MahApps.Metro.Resources 0.4:
- Available versions:
- (0.4, [https://api.nuget.org/v3/index.json])
- (0.6.1, [https://api.nuget.org/v3/index.json])
- (0.6.0, [https://api.nuget.org/v3/index.json])
- (0.5.0, [https://api.nuget.org/v3/index.json])
- (0.4.0, [https://api.nuget.org/v3/index.json])
- (0.3.0, [https://api.nuget.org/v3/index.json])
- (0.2.1, [https://api.nuget.org/v3/index.json])
- (0.2.0, [https://api.nuget.org/v3/index.json])
- (0.1.0.1, [https://api.nuget.org/v3/index.json])
- (0.1.0, [https://api.nuget.org/v3/index.json])
Please try to relax some conditions or resolve the conflict manually (see http://fsprojects.github.io/Paket/nuget-dependencies.html#Use-exactly-this-version-constraint).
This is fixed by pinning to 0.4.0.0
Repro steps
Please provide the steps required to reproduce the problem
-
checkout commit
0dafe2cea85489a51da534f2bc129f1119349961
-
run
build.bat
in root to pull all dependencies down and build the project. -
update
Fody
in paket.dependencies tonuget Fody 1.29.4 content: none
-
run
.\.paket\paket.exe update nuget Fody version 1.29.4
Expected behavior
Fody package is updated.
Actual behavior
Error shown above
Known workarounds
Pinning MahApps.Metro.Resources to exactly 0.4 solves the issue.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
NuGet unable to find the version of a package
gives this error: Unable to find version '1.0.0' of package 'Microsoft.Net.Compilers'. where the package has previously been installed ...
Read more >NuGet Package Dependency Resolution
Details on the process through which a NuGet package's dependencies are resolved and installed in both NuGet 2.x and NuGet 3.x+.
Read more >FAQ — Frequently Asked Questions
If it exists, Paket will ensure that the same versions are used when restoring packages. It is not strictly necessary to commit this...
Read more >Getting Started with Paket – Part 1 - The Cockney Coder
Unfortunately, this introduces a new problem – since NuGet doesn't record the versions of your transitive dependencies, you can't be sure that ...
Read more >NuGet packages in the Package Registry
When you publish a package with the same name or version as an existing package, the existing package is overwritten. Do not allow...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Simpler repro for anyone else working on this paket-2326.zip
I’m closing this as by design. Note that my last example is now working:
In general it should be working as soon as you specify all packages which should be allowed to be used as
prerelease
in the dependency file. Feel free to open another issue if this is not the case.