Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paket install fails if package version doesn't match .nupkg file #834

Closed
allykzam opened this issue May 20, 2015 · 7 comments
Closed

paket install fails if package version doesn't match .nupkg file #834

allykzam opened this issue May 20, 2015 · 7 comments

Comments

@allykzam
Copy link
Contributor

While working on #832, discovered that if a nuget-installed package (in this case, it was MvvmLightLibs version 5.0.2.0, which doesn't seem to be on NuGet.org anymore?) is in packages.config with the full version number, but the .nupkg file has a partial version number, it fails to download/install that package.

In my case, the package is stored in a local package source on a mapped drive pointing to a team network share (same one as my "help, there's spaces in my path" issues), and the packages.config file contains <package id="MvvmLightLibs" version="5.0.2.0" targetFramework="net40" /> referring to the package.

When running paket install it fails with Could not find file 'N:\Package Source\Here\MvvmLightLibs.5.0.2.0.nupkg'., and verifying that directory, it contains MvvmLightLibs.5.0.2.nupkg as downloaded from nuget.org previously. Updating all paket.dependencies and paket.lock files to show the version as 5.0.2 and running paket install again results in correctly downloading and unpacking everything.

@forki
Copy link
Member

forki commented May 20, 2015

Ok this one is tricky. But I assume we can apply the NormalizeVersion before we convert the package version in the dependencies file. This will remove the trailing 0 and is the safer choice. At least I think it is.

/cc @theimowski

@theimowski
Copy link
Member

Yes but how about the opposite? If we normalize but the nupkg file name has trailing zeros?

@allykzam
Copy link
Contributor Author

Not that I want to seriously suggest doing what NuGet does, but looks like NuGet.LocalPackageRepository.GetPackageLookupPaths() checks a handful of different versions of the file path to see what does(n't) exist: https://github.com/mono/nuget/blob/d129831d6fa1c7e3c83b520b877a273c636e120e/src/Core/Repositories/LocalPackageRepository.cs#L166-L199

@forki
Copy link
Member

forki commented May 20, 2015

Actually I thought I fixed the issue in the resolver. The problem is that not not every source feed behave the same in regards to trailing zeros.

@forki
Copy link
Member

forki commented May 23, 2015

this is happeing with local nuget feed (directory), right?
can you run it with -v?

@forki forki closed this as completed in 42573f7 May 23, 2015
@forki
Copy link
Member

forki commented May 23, 2015

Could you please try latest version

@allykzam
Copy link
Contributor Author

Remoted into my work machine and gave it a try, works great! Thanks, @forki 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants