DEV Community

Discussion on: Getting the "nuget" package manager working in Visual Studio 2019

Collapse
 
releek profile image
releek

Thanks for posting this. I have spent a lot of time trying to fix this issue on my own system.

It starts with

error FS3216: Package manager key 'nuget' was not registered in ...

So I downloaded nuget.org/packages/FSharp.Dependen... and extract with 7zip FSharp.DependencyManager.Nuget.dll and place it into C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ Common7 \ IDE \ CommonExtensions \ Microsoft \ FSharp \ Tools. (I have tried this with a couple of the older dll versions too).

When using F# interactive this generates a new warning:

warning FS3247: The dependency manager extension c: \ program files (x86) \ microsoft visual studio \ 2019 \ community \ common7 \ ide \ commonextensions \ microsoft \ fsharp \ Tools \ FSharp.DependencyManager.Nuget.dll could not be loaded. Message: Could not load file or assembly 'file:///c: \ program files (x86) \ microsoft visual studio \ 2019 \ community \ common7 \ ide \ commonextensions \ microsoft \ fsharp \ Tools \ FSharp.DependencyManager.Nuget.dll' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

and error:

error FS3216: Package manager key 'nuget' was not registered in [C: \ Users \ *** \ AppData \ Local \ assembly \ dl3 \ 9QMLVPXT.3WC \ J5RNVX75.4Y7 \ bf8bf0ca \ b1c727e6_4d72d701; c: \ program files (x86) \ microsoft visual studio \ 2019 \ community \ common7 \ ide \ commonextensions \ microsoft \ fsharp \ Tools \ ], []. Currently registered:

so I used Brian Berns information and instead copied the dll across from ...\Microsoft\FSharp to ...\Microsoft\FSharp\Tools replacing the version I had downloaded in the description above (and restarting visual studio). Now an F# interactive run generates the error:

Process is terminated due to StackOverflowException.

And now I am utterly stumped. Strangely, the same nuget dependency manager dll is working absolutely fine in VSCode.

Any ideas?