-
Notifications
You must be signed in to change notification settings - Fork 525
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
DependencyManager Win32Exception on non windows #3992
Comments
Same error here on macOS 10.15.7 + .NET SDK 5.0.201. |
@vilinsky thanks for reporting the issue.
Maybe you can contribute to the discussion from this point: dotnet/fsharp#8880 (comment) from my perspective, just this line should be enough for FSI to pickup the paket extension, if you share that idea, please engage there. For the error starting the process, as I've not used the extension outside windows, maybe there is some extra work to run paket.exe needed in how the process is started: Paket/src/FSharp.DependencyManager.Paket/ReferenceLoading.PaketHandler.fs Lines 228 to 255 in 483de34
Could you try if starting a process running the |
Hi @smoothdeveloper, It seems that the Paket extension fails to load with the In my > #r "nuget: FSharp.DependencyManager.Paket, 6.0.0-beta8";;
[Loading /var/folders/t3/gn5wn5p97073z3zyb9tzdrxw0000gn/T/nuget/88295--f42862a7-c063-4f87-8c9e-37425413af16/Project.fsproj.fsx]
unknown(1,1): warning FS3186: An error occurred while reading the F# metadata node at position 1 in table 'itycons' of assembly 'FSharp.DependencyManager.Paket, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
unknown(1,1): warning FS3186: An error occurred while reading the F# metadata node at position 0 in table 'ivals' of assembly 'FSharp.DependencyManager.Paket, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. Restarting with > #r "paket: nuget FParsec";;
:paket> using /Users/<username>/.nuget/packages/paket/6.0.0-beta8/tools/paket.exe
exception while resolving dependencies: System.ComponentModel.Win32Exception (8): Exec format error Running the $ /Users/<username>/.nuget/packages/paket/6.0.0-beta8/tools/paket.exe
zsh: exec format error: /Users/limbo/.nuget/packages/paket/6.0.0-beta8/tools/paket.exe |
Well, I found the cause -
A quick and dirty fix is > #r "paket: nuget FParsec";;
:paket> using /Users/limbo/.dotnet/tools/paket.exe
:paket> Paket version 6.0.0-beta8
:paket> Resolving dependency graph...
:paket> Installing into projects:
:paket> Created dependency graph (3 packages in total)
:paket> Total time taken: 3 seconds
#r "paket: nuget FParsec";;
^^^^^^^^^^^^^^^^^^^^^^^^^
stdin(1,1): error FS0078: Unable to find the file '/var/folders/t3/gn5wn5p97073z3zyb9tzdrxw0000gn/T/script-packages/673482622/.paket/load/net5.0/main.group.fsx' in any of
/var/folders/t3/gn5wn5p97073z3zyb9tzdrxw0000gn/T/script-packages/673482622/paket-files
<current-dir> |
The path generated by Paket is actually > #load "/var/folders/t3/gn5wn5p97073z3zyb9tzdrxw0000gn/T/script-packages/673482622/.paket/load/net50/main.group.fsx";;
[Loading /var/folders/t3/gn5wn5p97073z3zyb9tzdrxw0000gn/T/script-packages/673482622/.paket/load/net50/main.group.fsx]
> FParsec.Text.IsWhitespace ' ';;
Binding session to '/Users/<username>/.nuget/packages/fparsec/1.1.1/lib/netstandard2.0/FParsecCS.dll'...
val it : bool = true |
A quick fix would be: diff --git a/src/FSharp.DependencyManager.Paket/ReferenceLoading.PaketHandler.fs b/src/FSharp.DependencyManager.Paket/ReferenceLoading.PaketHandler.fs
index 2b8145e42..c92d93748 100644
--- a/src/FSharp.DependencyManager.Paket/ReferenceLoading.PaketHandler.fs
+++ b/src/FSharp.DependencyManager.Paket/ReferenceLoading.PaketHandler.fs
@@ -14,10 +14,11 @@ open System.IO
let tweakTargetFramework =
function
+ | "net5.0" -> "net50"
| "netcoreapp5.0" -> "net50"
| targetFramework -> targetFramework |
@iwinux, thanks a lot for going to that extent troubleshooting, the patch seems reasonable, would you mind making a PR with it? For the other workaround you explain about running of If you have the paket code around, it is not too hard to poke with it in a branch of yours and I can check out your branch to test it on windows to make sure we don't regress on it. Help appreciated to get it fixed! |
@smoothdeveloper It's my pleasure to help 😆. Please have a look at #4000 when you have time. (BTW: it feels difficult to build the whole project on macOS - a lot of errors flying around 🤨. I have to copy |
now with beta9 it finally works. Thank you @iwinux for investigation!
|
Description
Didn't found how to add private nuget sources in F# scripts. So tried to install paket as a package manager.
Followed instructions at https://fsprojects.github.io/Paket/fsi-integration.html
But this throws
Win32Exception
on MacosRepro steps
FSharp.DependencyManager.Paket
nuget sending the line to F# interactive#r "nuget: FSharp.DependencyManager.Paket"
Expected behavior
Expected it would add a package to the script
Actual behavior
Known workarounds
use nuget instead of paket as a package manager
Additional info
5.257.0
and latest prerelease6.0.0-beta8
in both cases is shown the usage of
5.257.0
versionThe text was updated successfully, but these errors were encountered: