question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

paket.local source+version override - IO error when used multiple times

See original GitHub issue

Description

Two projects (old fsproj format, net461). One depends on the other via nuget package. CI will put a different build number, so I use the paket.local source override with specific version to match local.

When restoring the first time after the local override, this works with the following message:

Paket version 5.91.0
paket.local override: nuget ImaginedCloud.Common group Main -> ..\infrastructure\deploy version 0.1.0

The next time restore runs it will error with the following msg:

Paket version 5.91.0
paket.local override: nuget ImaginedCloud.Common group Main -> ..\infrastructure\deploy version 0.1.0
Something went wrong while downloading ImaginedCloud.Common 0.1.0
Message: The file 'C:\Users\johlrich\.nuget\packages\ImaginedCloud.Common\0.1.0\ImaginedCloud.Common.0.1.0.nupkg' already exists.
  ==> Trying again
Something went wrong while downloading ImaginedCloud.Common 0.1.0
Message: The file 'C:\Users\johlrich\.nuget\packages\ImaginedCloud.Common\0.1.0\ImaginedCloud.Common.0.1.0.nupkg' already exists.
  ==> Last trial
Performance:
 - Disk IO: 165 milliseconds
 - Runtime: 1 second
Paket failed with
-> IOException: The file 'C:\Users\johlrich\.nuget\packages\ImaginedCloud.Common\0.1.0\ImaginedCloud.Common.0.1.0.nupkg' already exists.

Repro steps

Use paket to add a nuget package to a project. Create paket.local file with source override (not sure if version use matters) Run restore 2x - first should succeed, second should fail.

These specific projects are in a private feed, but it should be an easy repro. If you can’t repro let me know and I can throw together a simple repro with a public package.

Expected behavior

Should correctly restore the override without error when ran multiple times.

Actual behavior

Fails with error message in description above.

Known workarounds

Deleting the folder for the overridden version inside of the .nuget\packages\PackageName\ folder, will allow restore to grab the latest package override.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
matthidcommented, Sep 2, 2017

Should be fixed with 5.92.1

1reaction
matthidcommented, Sep 2, 2017

I feel like preventing a corrupt cache is more important here

Read more comments on GitHub >

github_iconTop Results From Across the Web

The paket.local file
Note: In the case of source overrides, paket restore assumes that the NuGet package already exists in the directory pointed to, no build...
Read more >
Latest beta not unzipping ModernHttpClient · Issue #2518
Using NuGet 3.4.2 beta instead of latest stable has resulted in my ModernHttpClient dependency failing to restore correctly:.
Read more >
Memory usage of a toy C# server and client with 500K ...
I've worked with JS, Java, C++, Perl and I've always preferred to use C# for personal projects. async/await - C# is the ONLY...
Read more >
46a9c7c6a258cf09c839efb6396...
Initial checkin of open source version of Chrome OS Windows Recovery Tool. ... level_str = L"ERROR"; break; + } + + SYSTEMTIME time; ......
Read more >
Nixpkgs 23.05 manual
This chapter describes how to extend and change Nixpkgs using overlays. ... Implementation note: Common names appear multiple times in the list of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found