update-package does not work for F# projects and possibly has never worked.
You can use my project https://github.com/jackfoxy/RandomBitsSolution for testing.
I have attempted this on a recent nightly build and it still does not work.
@foxyjackfox: @dotnetjunky @sforkmann @dnauck Using Nuget Package Manager v2.3.31113.21
Please thoroughly test the entire NuGet F# life cycle.
Comments: Found something interesting. It looks like the removereference call is currently casesensitive. The package dropped has the name Fsharpx.Core but the reference added is with the name FSharpx.Core so it fails to remove the reference. If while debugging I set it to exact same string it starts working fine… > NuGet.VisualStudio.dll!NuGet.VisualStudio.VsProjectSystem.RemoveReference(string name) Line 247 C# NuGet.Core.dll!NuGet.ProjectManager.RemovePackageReferenceFromProject(NuGet.IPackage package) Line 357 + 0x2f bytes C# NuGet.Core.dll!NuGet.ProjectManager.Execute(NuGet.PackageOperation operation) Line 170 + 0x1e bytes C# NuGet.Core.dll!NuGet.ProjectManager.Execute(NuGet.IPackage package, NuGet.IPackageOperationResolver resolver) Line 141 + 0xb bytes C# NuGet.Core.dll!NuGet.ProjectManager.RemovePackageReference(NuGet.IPackage package, bool forceRemove, bool removeDependencies) Line 306 + 0x84 bytes C# NuGet.Core.dll!NuGet.ProjectManager.RemovePackageReference(string packageId, bool forceRemove, bool removeDependencies) Line 300 + 0x17 bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.RemovePackageReference.AnonymousMethod__37() Line 840 + 0x2e bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.RunProjectAction(NuGet.IProjectManager projectManager, System.Action action) Line 1139 + 0xb bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.RemovePackageReference(NuGet.IProjectManager projectManager, string packageId, bool forceRemove, bool removeDependencies) Line 840 + 0x35 bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.UninstallPackage(NuGet.IProjectManager projectManager, string packageId, NuGet.SemanticVersion version, bool forceRemove, bool removeDependencies, NuGet.ILogger logger) Line 219 + 0x18 bytes C# NuGet.Cmdlets.dll!NuGet.PowerShell.Commands.UninstallPackageCommand.ProcessRecordCore() Line 50 + 0x87 bytes C# NuGet.Cmdlets.dll!NuGet.PowerShell.Commands.NuGetBaseCommand.ProcessRecord() Line 109 + 0xb bytes C#
You can use my project https://github.com/jackfoxy/RandomBitsSolution for testing.
I have attempted this on a recent nightly build and it still does not work.
@foxyjackfox: @dotnetjunky @sforkmann @dnauck Using Nuget Package Manager v2.3.31113.21
Please thoroughly test the entire NuGet F# life cycle.
Comments: Found something interesting. It looks like the removereference call is currently casesensitive. The package dropped has the name Fsharpx.Core but the reference added is with the name FSharpx.Core so it fails to remove the reference. If while debugging I set it to exact same string it starts working fine… > NuGet.VisualStudio.dll!NuGet.VisualStudio.VsProjectSystem.RemoveReference(string name) Line 247 C# NuGet.Core.dll!NuGet.ProjectManager.RemovePackageReferenceFromProject(NuGet.IPackage package) Line 357 + 0x2f bytes C# NuGet.Core.dll!NuGet.ProjectManager.Execute(NuGet.PackageOperation operation) Line 170 + 0x1e bytes C# NuGet.Core.dll!NuGet.ProjectManager.Execute(NuGet.IPackage package, NuGet.IPackageOperationResolver resolver) Line 141 + 0xb bytes C# NuGet.Core.dll!NuGet.ProjectManager.RemovePackageReference(NuGet.IPackage package, bool forceRemove, bool removeDependencies) Line 306 + 0x84 bytes C# NuGet.Core.dll!NuGet.ProjectManager.RemovePackageReference(string packageId, bool forceRemove, bool removeDependencies) Line 300 + 0x17 bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.RemovePackageReference.AnonymousMethod__37() Line 840 + 0x2e bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.RunProjectAction(NuGet.IProjectManager projectManager, System.Action action) Line 1139 + 0xb bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.RemovePackageReference(NuGet.IProjectManager projectManager, string packageId, bool forceRemove, bool removeDependencies) Line 840 + 0x35 bytes C# NuGet.VisualStudio.dll!NuGet.VisualStudio.VsPackageManager.UninstallPackage(NuGet.IProjectManager projectManager, string packageId, NuGet.SemanticVersion version, bool forceRemove, bool removeDependencies, NuGet.ILogger logger) Line 219 + 0x18 bytes C# NuGet.Cmdlets.dll!NuGet.PowerShell.Commands.UninstallPackageCommand.ProcessRecordCore() Line 50 + 0x87 bytes C# NuGet.Cmdlets.dll!NuGet.PowerShell.Commands.NuGetBaseCommand.ProcessRecord() Line 109 + 0xb bytes C#