No love for F#

Topics: General
Sep 12, 2012 at 11:24 PM

NuGet has been breaking all of my F# projects every time I update a package for more than six months now.

The related bug report has been seemingly ignored for five months.

The issue only happens in VS 2012, so I've been very patient the entire time VS 2012 has been in beta testing. But now it's been released, and I'd really love some sort of indication that someone somewhere is at least aware of the problem and looking into it.

Yes I know, it's open source, why don't I contribute a fix? I tried, but I can't build the NuGet source code on my machine because I don't have the right equipment to compile Visual Studio plugins. Also I don't have the first clue about VS's internal API for project references.

I don't think it's too much to ask that NuGet behave the same way for VS 2012 F# projects as it does for VS 2010 F# projects, and all C# projects.

Sep 18, 2012 at 3:55 PM

Somehow, that bug fell off our radar. I'll make sure it gets triaged in the next release of NuGet (2.2). Thanks for pointing it out.

Sep 18, 2012 at 3:57 PM

Thanks, I appreciate it!

Oct 8, 2012 at 7:30 PM

I know you said 2.2 for this issue, but I just wanted to point out that as of NuGet 2.1.31002.9028, things have actually gotten worse for F# rather than better. Now, not only does NuGet strip the HintPath from F# project files, it also fails to update the packages.config file.

The log shows "'packages.config' already exists. Skipping..." which according to what I could find online, happens when the packages.config file is present, but not part of the project. However, the packages.config file is in fact part of the F# project. Since this file isn't updated, NuGet has no idea that it has just installed an update or a new package in the project.

I don't know if this latest issue happens in VS 2010, but as it stands now, NuGet appears to be 100% unusable in F# projects in VS 2012. I hope that raises the priority somewhat...

Oct 9, 2012 at 7:32 PM

Yes, it looks like either we broke something in F# projects in VS 2012 or the F# project system has changed its implementation which breaks us.

Thanks for reporting it. I'll make sure this will be addressed in 2.2. I'll raise the Impact of the bug to High. 

Meanwhile, can you try it in VS 2010 to see if it works for your case?

Oct 9, 2012 at 10:04 PM

With the same F# project in VS 2010 with the same version of NuGet, the HintPath problem goes away, but the "failing to update packages.config" problem remains. It seems that the HintPath issue was introduced by changes in VS 2012, while the packages.config issue was introduced by NuGet 2.1.31002.9028.

Here's the log when I run it in VS 2010:

PM> update-package Newtonsoft.Json

Updating 'Newtonsoft.Json' from version '4.5.7' to '4.5.10' in project 'SwiftK.Controls.FSharp'.

'packages.config' already exists. Skipping...

Successfully removed 'Newtonsoft.Json 4.5.7' from SwiftK.Controls.FSharp.

Successfully installed 'Newtonsoft.Json 4.5.10'.

'packages.config' already exists. Skipping...

Successfully added 'Newtonsoft.Json 4.5.10' to SwiftK.Controls.FSharp.

Oct 24, 2012 at 7:30 PM
Edited Oct 24, 2012 at 7:32 PM

It fails pretty badly in VS2010 with same symptoms as above posters.

This is vastly disruptive to projects with lots of F# and NuGets. More than a month in, no release yet?