Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
It looks like we cannot compile .NET Core F# apps with mono `msbuild`
Steps to reproduce:
1) `dotnet new console -lang F# -n HelloWorld`
2) `cd HelloWorld`
3) `msbuild /t:Restore HelloWorld.fsproj`
4) `msbuild /t:Build HelloWorld.fsproj`
"/Users/kylewhite/deleteme/HelloWorld/HelloWorld.fsproj" (Build target) (1) ->
(CoreCompile target) ->
/Users/kylewhite/.nuget/packages/fsharp.net.sdk/1.0.2/build/FSharp.NET.Core.Sdk.targets(210,15): error MSB4064: The "SkipCompilerExecution" parameter is not supported by the "Fsc" task. Verify the parameter exists on the task, and it is a settable public instance property. [/Users/kylewhite/deleteme/HelloWorld/HelloWorld.fsproj]
/Users/kylewhite/.nuget/packages/fsharp.net.sdk/1.0.2/build/FSharp.NET.Core.Sdk.targets(170,9): error MSB4063: The "Fsc" task could not be initialized with its input parameters. [/Users/kylewhite/deleteme/HelloWorld/HelloWorld.fsproj]
Diagnostic restore and build logs: https://gist.github.com/kdubau/d4177b9eed5647889c058d1b2dea2d5b
Mono JIT compiler version 126.96.36.199 (2017-02/1434f9c Tue Apr 25 05:54:09 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
GC: sgen (concurrent by default)
This is blocked on https://github.com/dotnet/netcorecli-fsc/issues/96 .
Matt Ward suggests that for now you have to change the FSharp.NET.Sdk package reference to 1.0.1 .
@Matt, any idea when they plan to fix this?
I guess we need to update the F# compiler that ships with Mono to support the SkipCompilerExecution parameter. Whether that is going to happen for 15.2 is another question.
Whilst the project here was created with dotnet new, VS for Mac has the same problem since it is using the same templates that have:
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
Which currently means the 1.0.2 FSharp.NET.Sdk NuGet package is used.
The current workaround is just to change this to use 1.0.1:
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.1" PrivateAssets="All" />
On the VS for Mac side a short term fix may be to create custom project templates for F# and set the FSharp.NET.Sdk version to 1.0.1 so they work out of the box.
We should probably mark this as an upstream bug since it is not something we can fix in Mono's MSBuild. It is a bug in the FSharp.Compiler.Tools:
Mono's F# compiler is not used.
The only workaround is to edit the .fsproj and change the FSharp.NET.Sdk to target 1.0.1.
This has been fixed in the FSharp.NET.Sdk 1.0.3 NuGet package.
It working for me with the new package. Verified