Bug 52907 - Package FSharp.NET.Sdk with MSBuild/Mono
Summary: Package FSharp.NET.Sdk with MSBuild/Mono
Alias: None
Product: Tools
Classification: Mono
Component: msbuild ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Ankit Jain
Depends on:
Reported: 2017-02-28 17:43 UTC by Matt Ward
Modified: 2017-03-24 09:21 UTC (History)
1 user (show)

Tags: 2017-02
Is this bug a regression?: ---
Last known good build:

FSharpConsole project (1.22 KB, application/zip)
2017-02-28 17:43 UTC, Matt Ward
FSharp sdk targets (1.63 KB, application/zip)
2017-03-07 19:28 UTC, Matt Ward

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Matt Ward 2017-02-28 17:43:54 UTC
Created attachment 20035 [details]
FSharpConsole project

Ship the FSharp.NET.Sdk MSBuild targets with mono needed to compile F# .NET Core projects, like the one attached, from the command line with msbuild.
Comment 1 Ankit Jain 2017-03-02 13:13:27 UTC
Where should this package be taken from, and which version? https://www.nuget.org/packages/FSharp.NET.Sdk/1.0.0 ?
Comment 2 Matt Ward 2017-03-07 19:28:13 UTC
Created attachment 20188 [details]
FSharp sdk targets

No. On NuGet.org that is the package used at build time. The Sdk files that ship with .NET Core SDK are pretty minimal. I have attached the FSharp targets that ship with .NET Core SDK 1.0.1 that was released today.
Comment 3 Matt Ward 2017-03-07 21:40:16 UTC
The FSharp.NET.Sdk NuGet package assumes that dotnet is available in a path relative to where the Sdks are available. Version 1.0.0 of this NuGet package used the following path where it assumed dotnet cli was available: 


Version 1.0.1 of the FSharp.NET.Sdk NuGet package assumes dotnet is available at:


Since Mono will not ship dotnet cli then we cannot ship the FSharp Sdk .targets with Mono.
Comment 4 Matt Ward 2017-03-20 20:53:44 UTC
Possibly we can set the DontRunFscWithDotnet property to true in the Sdk.props we ship with Mono. This would prevent the dotnet cli from being used.

I ran a simple test setting DontRunFscWithDotnet to true in a F# .NET Core console project and it did not use dotnet to compile but instead used fsc.exe from the fsharp.compiler.tools NuGet package. However that seemed to fail with a build error " The "SkipCompilerExecution" parameter is not supported by the "Fsc" task."
Comment 5 Ankit Jain 2017-03-24 00:41:39 UTC
I have added the F# sdk files from comment #2 . But I still want to confirm with what VS is packaging.

I also modified it to use mono's f# compiler and to use mono instead of dotnet.  With that I can build the `FSharpConsole` project, but with the reference to nuget package `FSharp.NET.Sdk` changed to `1.0.1` .

Closing this.
Comment 6 Matt Ward 2017-03-24 09:21:51 UTC
Visual Studio 2017 does not currently package/ship F# sdk files.