Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does NuGet Update UI work at all?

It just baffles me that even though upddates show up in the Manage NuGet Packages UI for a solution, clicking the update button results in a process that looks like it should work and then fails at the end for no apparent reason. I always have to fall back to uninstalling by hand, removing the project references for the library, and manually deleting the reference from the project file. (Why remove does not do this I have no idea.)

My Setup:

VS2012RC - maybe this works in VS2012RTM?

NuGet v2.1 - the latest as far as I know

F# - I've only been working in F# lately, maybe the problem is specific to F#?

FSharpx.Core - this is the library I update all the time, but I have experienced it with others

At first the messages look like it is working (upgrading from 1.6.78 to 1.6.83)

Added file 'FSharpx.Core.1.6.83.nupkg' to folder 'FSharpx.Core.1.6.83'.
etc.

Successfully installed 'FSharpx.Core 1.6.83'.
'FSharpx.Core 1.6.83' already installed.
Looking for updates for 'FSharpx.Core'...
Updating 'FSharpx.Core' from version '1.6.78' to '1.6.83' in project 'DS_Benchmark'.
'packages.config' already exists. Skipping...
Successfully removed 'FSharpx.Core 1.6.78' from DS_Benchmark.
'packages.config' already exists. Skipping...

Maybe skipping 'packages.config' is the problem, since the version should be updated in that file.

Then the messages start looking bad. Just installed files start getting removed.

Removed file 'FreebaseTypeProvider.htm' to folder 'C:\Users\Jack\Documents\GitHub\DS_Benchmark\packages\FSharpx.Core.1.6.83\...
etc.
Successfully uninstalled 'FSharpx.Core 1.6.83'.

(As an aside, could NuGet please use the correct preposition for "remove" in their message?)

like image 744
Jack Fox Avatar asked Oct 09 '12 19:10

Jack Fox


People also ask

Should you update NuGet packages?

Well, you should update whenever you are able to cope with it. So you need to think carefully about the regression updating the packages could cause to your application if already in production, or the extra tests you are going to need to carry on in order to verify everything seems to be working as expected.


1 Answers

It's a bug in NuGet 2.1, or else a change to the F# project system in VS 2012 that breaks NuGet.

http://nuget.codeplex.com/discussions/395351

They've acknowledged the problem, and pledge to have it fixed in NuGet 2.2. In the meantime, you can help by voting for the bug, and also this other NuGet/F#/VS2012 bug.

like image 166
Joel Mueller Avatar answered Nov 15 '22 07:11

Joel Mueller