Can't install packages to F# Library projects


With the CTP2 (shipped with MVC3RC) it is not possible to install packages to F# 3.5 and F#4.0 Library Projects.

The project does not appear in the Default Project dropdown, and the Add Library Reference menu does not appear and Refernces Popup.

If i add the project via the -project parameter then

Install-Package : Missing Project parameter or invalid project name.

error occcurs.
Closed Aug 17, 2014 at 3:32 PM by JeffHandley


AlbertWeinert wrote Nov 11, 2010 at 7:03 AM

FsharpProjectTypeGuid = "{F2A71F9B-5D33-465A-A702-920D77279786}"

dfowler wrote Nov 11, 2010 at 8:35 AM

F#'s project type isn't supported as yet

AlbertWeinert wrote Nov 11, 2010 at 1:37 PM

In know, that's why i included the FsharpProjectTypeGuid in the comment ;)

dfowler wrote Nov 12, 2010 at 8:56 AM

Thats not the reason :) it's not supported

AlbertWeinert wrote Nov 12, 2010 at 9:28 AM

Oh that's easy, support it.

F# is supported in Visual Studio 2010, why not support it nuget?

Haacked wrote Nov 12, 2010 at 3:17 PM

If it's so easy, send a patch via pull request! Make it happen! :)

AlbertWeinert wrote Nov 12, 2010 at 3:59 PM

Done ;)

Haacked wrote Nov 12, 2010 at 4:06 PM

Did you test that out and install a bunch of different types of packages? I was told that there may be differences in the F# project templates on how it handles certain types of references.

AlbertWeinert wrote Nov 12, 2010 at 8:47 PM

Yes, i tryed it, it work with some packages it works without problem. Some (maybe dfowler, you or whoever) wrote me that i should try install SQLCE.EntityFramework.

I've tryd it and i fails.

BUT! It seems not fails inside NuGet, it's fails in the install.ps1 and uninstall.ps1 scripts from the SQLCE Package.

The Scripts try to add and remove a PostBuildEvent.

In fact, if i remove the scripts from the package, the SQLCE Package Installs and Uninstalls fine.

AlbertWeinert wrote Nov 12, 2010 at 9:22 PM

And the Scripts works directly with the DTE Project, so nothing that can nuget do.
So it's not the fault of nuget, or a problem in nuget (with my current knowledge.

Other reasons not to support F#?

dfowler wrote Nov 13, 2010 at 8:43 AM

Basically all content files are broken. If we're ok with that then we can add it to the list of "supported" projects so we don't block scenarios that work, but we're not focusing on fixing F# as a priority, so if you get other weird issues we wouldn't be rushing to fix them.

Haacked wrote Nov 13, 2010 at 5:42 PM

The SQLCE issue I can live with, though I don't like it. I don't like the idea of suggesting we support F# if we can't support a core feature like content files. Albert, can you try to install the jQuery package and see what happens?

AlbertWeinert wrote Nov 14, 2010 at 10:07 AM

jQuery also fails, that's sad. I will take a look on that.

AlbertWeinert wrote Nov 14, 2010 at 10:46 AM

It seems that Microsoft.VisualStudio.FSharp.ProjectSystem.Automation.OANavigableProjectItems.AddFromDirectory(string) is not implemented. Maybe the F# Integration Team can help?

forki wrote Nov 15, 2010 at 6:08 AM

Brian McNamara from the F# Team wrote to me:

"Yes, this is not yet implemented.
is implemented, perhaps the NuGet implementation can fall back to iterating over the directory’s files and add them individually this way?"

Regards, Steffen

dfowler wrote Nov 15, 2010 at 7:53 AM

@forki can you add me to the thread? david.fowler@microsoft.com. Would be good to find out if there was an easy workaround.

dfowler wrote Dec 23, 2010 at 8:21 AM

I added support for F# in a fork, it's a little hackish but the core scenarios work.

I also added functional tests for F# projects

dfowler wrote Jan 24, 2011 at 11:15 PM

Fixed in changeset f6ec33d3c608

dfowler wrote Jan 25, 2011 at 2:40 AM

Fixed in changeset f172984de65a

feiling wrote Jan 6, 2014 at 11:25 PM

Fixed in changeset dc682826c2a4e87cee71e43d0753b5efc36885a9

feiling wrote Jan 6, 2014 at 11:25 PM

Fixed in changeset ba2a21bed36feda4b5f123420de78c49c4306e9b