Paket
Paket copied to clipboard
Could not find nuspec in ... on paket update
Description
When I run paket.exe update
in the Paket repository I get:
Paket failed with
-> Could not find nuspec in 'E:\Projects\Paket\packages\System.Xml.XPath.XmlDocument.4.3.0', try deleting the directory and restoring again.
Click for verbose stack
Paket failed with
-> Could not find nuspec in 'E:\Projects\Paket\packages\System.Xml.XPath.XmlDocument.4.3.0', try deleting the directory and restoring again.
StackTrace:
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1645.Invoke(String message)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at [email protected](Tuple`2 _arg1)
at [email protected](a a)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
at Microsoft.FSharp.Collections.Internal.IEnumerator.map@74.DoMoveNext(b& curr)
at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@274[T,TResult](ConcatEnumerator`2 x, Unit unitVar0)
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@274[T,TResult](ConcatEnumerator`2 x, Unit unitVar0)
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
at Paket.InstallProcess.InstallIntoProjects[a](InstallerOptions options, Boolean forceTouch, DependenciesFile dependenciesFile,
LockFile lockFile, FSharpList`1 projectsAndReferences, FSharpMap`2 updatedGroups)
at Paket.UpdateProcess.SmartInstall(DependenciesFile dependenciesFile, UpdateMode updateMode, UpdaterOptions options)
at <StartupCode$Paket-Core>[email protected](Unit unitVar0)
at Paket.Utils.RunInLockedAccessMode[a](String lockedFolder, FSharpFunc`2 action)
at [email protected](ParseResults`1
results)
at Paket.Program.processWithValidationEx$cont@33[a](Boolean
silent, FSharpFunc`2 commandF, a result, Unit unitVar)
at Paket.Program.processWithValidation[T](Boolean silent, FSharpFunc`2 validateF, FSharpFunc`2 commandF, ParseResults`1 result)
at Paket.Program.handleCommand(Boolean silent, Command command)
at Paket.Program.main()
Repro steps
-
git clone https://github.com/fsprojects/Paket.git
-
cd Paket
-
.paket/paket.exe update
Expected behavior
Works
Actual behavior
Error from above
Known workarounds
As paket has already written the lockfile at this point you can just paket restore
can't repro. can you please try to attach debugger and send PR?
scratch that. now I can repro.
wtf happened? we have 3 folders for XmlDocument
did you actually repro when running update directly after cloning?
maybe not I assumed it would because I tried deleting stuff...
try nuking packages folder and run update again. does it work?
For me it didn't.
On Mon, Apr 9, 2018 at 9:07 AM, Steffen Forkmann [email protected] wrote:
try nuking packages folder and run update again. does it work?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/3144#issuecomment-379655639, or mute the thread https://github.com/notifications/unsubscribe-auth/ABx6332ZVHIK71hUeA9HZHG-ZH7IZnLUks5tmwjEgaJpZM4TLrx1 .
Just for the record: I'm still seeing this :)
wtf happened? we have 3 folders for XmlDocument
I think 2 are because we use version_in_path somewhere, 3 is probably another bug ;)
Is there a solution to this issue yet?
I've been struggling with this. My current prime suspect is "Paket.Restore.targets", but I don't know what to do next.
The error occurs in this build, which is based on this commit.
I have the problem on my local machine and on appveyor. Locally I've worked with .net core 3.0, but I set the SDK to 2.2.100 because dotnet pack suddenly did not like the --no-build option anymore, which is a known problem.
Apparantly - when I first call DotNet.restore and then Paket.restore in the build.fsx, the whole thing works.
So this:
Target.create "Restore" (fun _ ->
solutionFile
|> DotNet.restore id
)
Becomes this:
Target.create "Restore" (fun _ ->
solutionFile
|> DotNet.restore id
Paket.restore id
)
Info:
fake --version
FAKE 5 - F# Make (5.18.2) (this line is written to standard error, see https://github.com/fsharp/FAKE/issues/2066)
FakePath: C:\Users\frank\.dotnet\tools\.store\fake-cli\5.18.2\fake-cli\5.18.2\tools\netcoreapp2.1\any\Fake.Runtime.dll
Paket.Core: 5.226.0
.paket\paket --version
Paket version 5.193.0
Bit of an old one but this has just happened to me and I've found a workaround. If you rename the package extension from .nupkg to .zip you can then extract the nuspec file and all is well.
I’m getting this now after running a nuget locals all -clear
. Deleting ~/.nuget/packages
doesn’t help, and doing a dotnet restore
(which succeeds) doesn’t help. The packages it complains about definitely have no .nuspec on disk, I’m not sure what exactly is going on here.
I think I might have been served some corrupt nupkgs from a CDN somewhere - I noticed the file was a lot smaller than it should have been. I manually downloaded from nuget & unzipped and all was good.
I've run into this with 6.2.1 and I'm having to unzip the nuspec file from each package. Deleting local packages etc doesn't seem to help
I get this behaviour consistently when trying to update a dependency in FSharpLint repo master branch:
% $HOME/.dotnet/tools/paket update Ionide.ProjInfo.ProjectSystem
Paket version 7.1.3+c3f7fc17b8e07eeb633f61549fd0259920f742d5
Updating Ionide.ProjInfo.ProjectSystem in /Users/knocte/Documents/Code/FSharpLintMASTER/paket.dependencies group Main
Resolving dependency graph...
Installing into projects:
Created dependency graph (321 packages in total)
Total time taken: 44 seconds
Paket failed with
-> Could not find nuspec in '/Users/knocte/Documents/Code/FSharpLintMASTER/packages/docs/runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl', try deleting the directory and restoring again.
@forki: just wondering how this can still be an issue after 4 years? If it is because of not having a reproducible testcase, I just provided one :) AMA
Forgot to mention important info:
- Deleting folder doesn't make the error go away.
- I'm using last version of paket (7.1.3+c3f7fc17b8e07eeb633f61549fd0259920f742d5).
- I'm in macOS Monterrey (12.3.1)
Today I tried with my Windows machine, and it didn't crash:
C:\Users\knocte\Documents\Code\FSharpLint>paket update Ionide.ProjInfo.ProjectSystem
Paket version 7.1.4+6190f61f11581b1d1d44c8e8e74ea97ccdb8760a
Updating Ionide.ProjInfo.ProjectSystem in C:\Users\knocte\Documents\Code\FSharpLint\paket.dependencies group Main
Resolving dependency graph...
Installing into projects:
Created dependency graph (321 packages in total)
Could not detect any platforms from 'config' in 'C:\Users\knocte\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.2\build\config\AnalysisLevel_2_9_8_AllDisabledByDefault.editorconfig', please tell the package authors
Calling dotnet restore on FSharpLint.sln
Welcome to .NET 5.0!
---------------------
SDK Version: 5.0.406
Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Determining projects to restore...
Restored C:\Users\knocte\Documents\Code\FSharpLint\src\FSharpLint.Console\FSharpLint.Console.fsproj (in 891 ms).
Restored C:\Users\knocte\Documents\Code\FSharpLint\tests\FSharpLint.Benchmarks\FSharpLint.Benchmarks.fsproj (in 891 ms).
Restored C:\Users\knocte\Documents\Code\FSharpLint\tests\FSharpLint.FunctionalTest\FSharpLint.FunctionalTest.fsproj (in 891 ms).
Restored C:\Users\knocte\Documents\Code\FSharpLint\tests\FSharpLint.Core.Tests\FSharpLint.Core.Tests.fsproj (in 891 ms).
Restored C:\Users\knocte\Documents\Code\FSharpLint\src\FSharpLint.Core\FSharpLint.Core.fsproj (in 891 ms).
Restored C:\Users\knocte\Documents\Code\FSharpLint\tests\FSharpLint.Console.Tests\FSharpLint.Console.Tests.fsproj (in 891 ms).
Total time taken: 38 seconds
Paket omitted 17 warnings. You can see them in verbose mode.
However, the file packet.dependencies was not changed (not sure if this is the reason for not crashing). Note the paket version I got is different. Now I'll try upgrading my macOS to 7.1.4+6190f61f11581b1d1d44c8e8e74ea97ccdb8760a and test again there.
Now I'll try upgrading my macOS to 7.1.4+6190f61f11581b1d1d44c8e8e74ea97ccdb8760a and test again there.
Interestingly enough, before updating paket in my macOS, I tried paket update again, and even if I got the crash, I got a different log:
% $HOME/.dotnet/tools/paket update Ionide.ProjInfo.ProjectSystem
Paket version 7.1.3+c3f7fc17b8e07eeb633f61549fd0259920f742d5
Updating Ionide.ProjInfo.ProjectSystem in /Users/knocte/Documents/Code/FSharpLintMASTER/paket.dependencies group Main
Resolving dependency graph...
Installing into projects:
Created dependency graph (321 packages in total)
Something went wrong while downloading runtime.native.System.Net.Security 4.3.1
Message: Start of process ln failed.
==> Trying again
Something went wrong while downloading System.Security.Cryptography.Csp 4.3
Message: Start of process ln failed.
==> Trying again
Something went wrong while downloading System.Reflection 4.3
Message: Start of process ln failed.
==> Trying again
Downloading System.Security.Cryptography.Csp 4.3 (Docs)
Downloading runtime.native.System.Net.Security 4.3.1 (Docs)
Downloading System.Reflection 4.3 (Docs)
Something went wrong while downloading Microsoft.Build.Utilities.Core 16.10
Message: Start of process ln failed.
==> Trying again
Downloading Microsoft.Build.Utilities.Core 16.10 (Docs)
Downloading System.Net.Security 4.3.2 (Docs)
Download of System.Security.Cryptography.Csp 4.3 (Docs) done in 918 milliseconds. (1026 kbit/s, 0 MB)
Download of System.Net.Security 4.3.2 (Docs) done in 646 milliseconds. (3198 kbit/s, 0 MB)
Download of Microsoft.Build.Utilities.Core 16.10 (Docs) done in 887 milliseconds. (5217 kbit/s, 0 MB)
Download of System.Reflection 4.3 (Docs) done in 962 milliseconds. (5828 kbit/s, 0 MB)
Something went wrong while downloading Microsoft.NETCore.Targets 5.0
Message: Start of process ln failed.
==> Trying again
Downloading Microsoft.NETCore.Targets 5.0 (Docs)
Downloading System.Resources.ResourceManager 4.3 (Docs)
Download of System.Resources.ResourceManager 4.3 (Docs) done in 17 milliseconds. (40427 kbit/s, 0 MB)
Something went wrong while downloading System.Resources.ResourceManager 4.3
Message: The file '/Users/knocte/.nuget/packages/system.resources.resourcemanager/system.resources.resourcemanager.4.3.0.nupkg' already exists.
==> Trying again
Downloading System.Resources.ResourceManager 4.3 (Docs)
Not moving as '/Users/knocte/.nuget/packages/system.resources.resourcemanager/4.3.0/system.resources.resourcemanager.4.3.0.nupkg' already exists (maybe some other instance downloaded it as well)
Download of System.Resources.ResourceManager 4.3 (Docs) done in 42 milliseconds. (16363 kbit/s, 0 MB)
Total time taken: 54 seconds
Paket failed with
-> Could not find nuspec in '/Users/knocte/Documents/Code/FSharpLintMASTER/packages/docs/System.Resources.ResourceManager', try deleting the directory and restoring again.
Upgrading didn't fix the crash or change the error message, but the log is slightly different (which suggests this might be some kind of race condition):
% dotnet tool update -g paket
Tool 'paket' was successfully updated from version '7.1.3' to version '7.1.4'.
knocte@apples-MacBook-Pro FSharpLintMASTER % $HOME/.dotnet/tools/paket update Ionide.ProjInfo.ProjectSystem
Paket version 7.1.4+6190f61f11581b1d1d44c8e8e74ea97ccdb8760a
Updating Ionide.ProjInfo.ProjectSystem in /Users/knocte/Documents/Code/FSharpLintEMEKA/paket.dependencies group Main
Resolving dependency graph...
Installing into projects:
Created dependency graph (321 packages in total)
Downloading Microsoft.NETCore.Targets 5.0 (Build)
Download of Microsoft.NETCore.Targets 5.0 (Build) done in 978 milliseconds. (294 kbit/s, 0 MB)
Downloading runtime.native.System.Net.Security 4.3.1 (Docs)
Download of runtime.native.System.Net.Security 4.3.1 (Docs) done in 48 milliseconds. (5069 kbit/s, 0 MB)
Something went wrong while downloading runtime.native.System.Security.Cryptography.OpenSsl 4.3.3
Message: Start of process ln failed.
==> Trying again
Something went wrong while downloading System.Security.Cryptography.ProtectedData 5.0
Message: Start of process ln failed.
==> Trying again
Downloading runtime.native.System.Security.Cryptography.OpenSsl 4.3.3 (Docs)
Downloading System.Security.Cryptography.ProtectedData 5.0 (Docs)
Something went wrong while downloading System.Globalization.Calendars 4.3
Message: Start of process ln failed.
==> Trying again
Downloading System.Globalization.Calendars 4.3 (Docs)
Total time taken: 46 seconds
Paket failed with
-> Could not find nuspec in '/Users/knocte/Documents/Code/FSharpLintMASTER/packages/docs/System.Resources.ResourceManager', try deleting the directory and restoring again.
Now I changed my local global.json to match the one I have in my Windows machine (from sdk version 6.0.103 to 5.0.406), but the problem still doesn't go away in macOS (while it doesn't happen in Windows). And yet again, different log:
% nano global.json
% $HOME/.dotnet/tools/paket update Ionide.ProjInfo.ProjectSystem
Paket version 7.1.4+6190f61f11581b1d1d44c8e8e74ea97ccdb8760a
Updating Ionide.ProjInfo.ProjectSystem in /Users/knocte/Documents/Code/FSharpLintMASTER/paket.dependencies group Main
Resolving dependency graph...
Installing into projects:
Created dependency graph (321 packages in total)
Downloading FSharp.Core 5.0.2 (Build)
Download of FSharp.Core 5.0.2 (Build) done in 146 milliseconds. (74143 kbit/s, 1 MB)
Downloading runtime.native.System.Security.Cryptography.OpenSsl 4.3.3 (Docs)
Something went wrong while downloading System.Security.Cryptography.OpenSsl 5.0
Message: Start of process ln failed.
==> Trying again
Downloading System.Security.Cryptography.OpenSsl 5.0 (Docs)
Download of runtime.native.System.Security.Cryptography.OpenSsl 4.3.3 (Docs) done in 99 milliseconds. (2124 kbit/s, 0 MB)
Downloading System.Globalization.Calendars 4.3 (Docs)
Download of System.Globalization.Calendars 4.3 (Docs) done in 78 milliseconds. (18224 kbit/s, 0 MB)
Something went wrong while downloading Newtonsoft.Json 13.0.1
Message: Start of process ln failed.
==> Trying again
Downloading Newtonsoft.Json 13.0.1 (Docs)
Total time taken: 54 seconds
Paket failed with
-> Could not find nuspec in '/Users/knocte/Documents/Code/FSharpLintMASTER/packages/docs/System.Resources.ResourceManager', try deleting the directory and restoring again.
HTH