paket restore failing in 5.201.2
Description
Running paket restore on an existing solution results in an error on 5.201.2:
Resource stream 'Paket.Restore.targets' could not be found in the Paket.Core assembly
Running paket restore on the same project with 5.201.1 works.
Repro steps
Run a paket restore using version 5.201.2 on an existing solution.
Expected behavior
paket restore should run successfully.
Actual behavior
Paket failed with
-> Resource stream 'Paket.Restore.targets' could not be found in the Paket.Core assembly
Known workarounds
Use 5.201.1
I'm seeing the same behavior. Any chance this release could be rolled back?
Me too.
Same here...causing a lot of issues on our build server that uses the bootstrapper to get the latest.
I agree with @WramblinWreck that this release should be rolled back or a new release should be made with a revert commit. If anyone is using paket in "Magic Mode" it breaks quite mysteriously on the build server. That is not that magic I expected 😢
This has to do with the names of resources: The name of the resource has changed somehow from the simple version to the fully-qualified version. For example in my work application I had to make a function to prepend the expected namespace of an embedded resource to the 'simple name', like so:
let resourceName simpleName = sprintf "%s.%s" "My.Assembly.Fully.Qualified.Name" simpleName
I made a change recently to always get the targets file...but that has been in a while (since 5.201.0), so don't think that it's that. Maybe we should make it check simple and fully qualified names.
Does anyone know how to pin the paket.exe version so that we can work around this?
@trumpi https://fsprojects.github.io/Paket/dependencies-file.html#Global-options
The "extractElement" function in https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/Installation/RestoreProcess.fs is where this error is coming from.
I'm not near a machine to put logic to handle simple and full resource names if anyone else is able 👍
@BlythMeister I'm looking right now to prove my assertion above. On .net core I get the following resource names:
resource names: [|"Paket.Restore.targets"; "FSharpSignatureData.Paket.Core";
"FSharpOptimizationData.Paket.Core"|]
which is what I expect to see (and what the code looks for), but I think on full-framework the behavior might be different. Having a hard time building on mono right now to validate that assertion though.
@baronfel Just from past experience, I've always had to use fully-namespaced paths in C# on .NET Framework.
Now I am confused: I finally got a good build on mono 5.23 and get the following results:
resource names: [|"Paket.Restore.targets"; "FSharpSignatureData.Paket.Core";
"FSharpOptimizationData.Paket.Core"|]
these are the same as for .net core.
All of this makes sense as to why this mysteriously started happening. Maybe @forki just needs to rebuild/release
These exe has dropped in size by approx 200kb in this 1 release...I'm not convinced the resources are in there 🙄
I downloaded the latest release and can confirm the resource is missing:
> let paketAssy = Assembly.LoadFrom(paketPath);;
val paketAssy : Assembly =
paket, Version=5.201.2.0, Culture=neutral, PublicKeyToken=null
> paketAssy.GetManifestResourceNames();;
val it : string [] =
[|"FSharpSignatureData.Paket.Core"; "FSharpOptimizationData.Paket.Core";
"FSCore.resources"; "FSharpSignatureInfo.FSharp.Core";
"FSharpOptimizationInfo.FSharp.Core"; "FSharpSignatureData.Argu";
"FSharpOptimizationData.Argu"; "FSharpSignatureData.Chessie";
"FSharpOptimizationData.Chessie"; "FSharpSignatureData.paket";
"FSharpOptimizationData.paket"; "ILRepack.List"|]
Mystery solved...but now need someone to re-release...
oh my fucking god. something really bad happened after installing VS 2019
I'm trying to revert. and then please retry. But I assume this is unrelated to the changes I made
I don't think it's your changes.
ok please retry. and sorry for delay
At a guess...based on exe size still being down a few hundred kB...it might still be broken...not at a machine to test though.