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
Developer Community or GitHub 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.
Just downloaded XS6.0 Preview 3 (build 3668) for Windows and:
1. File -> New -> Solution
2. Choose "Other -> .NET" in the left panel.
3. "Console Project" will be highlighted in the list.
4. Choose F# language on the combobox.
5. Click on Next button, give a name for solution and project.
6. Click Create button.
Nothing happens, clicking on "Create" button doesn't have any effect at all (NOTE: for C# projects, this works fine).
Should create F# project.
Can you attach the IDE logs? If the new project dialog is not getting passed the Create button click then an exception is most likely being thrown and it should be logged.
> Can you attach the IDE logs?
Sure, where are the logs located in a Windows8.1 OS?
I always use Help - Open Log Directory to find the logs.
Created attachment 14709 [details]
> I always use Help - Open Log Directory to find the logs.
Cool! Thanks for the tip. I'm attaching the file which seems relevant to this. I'm guessing the culprit is this:
ERROR [2016-01-25 13:04:37Z]: An unhandled exception has occured. Terminating Xamarin Studio? False
System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'FSharp.Core, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
See the file for the whole stack trace.
(NOTE: I can create F# projects fine with VisualStudio, which is also installed in this box.)
Yes that seems to be the cause of the failure to create the F# project. With the full callstack you can see the New Project dialog trying to get the code dom provider from the F# language binding and the FSharp.Core assembly cannot be resolved.
On my machine it works since I have F# 3.1 installed so it finds FSharp.Core:
C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\220.127.116.11\FSharp.Core.dll
I could update the New Project dialog so the project can still be created although I suspect other parts would then fail when Xamarin Studio tries to use the F# addin.
It would be good if Xamarin Studio could detect that F# 3.1 is not installed and indicate that this is the problem.
> On my machine it works since I have F# 3.1 installed so it finds FSharp.Core:
In my machine, FSharp.Core.dll is here:
C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0
> It would be good if Xamarin Studio could detect that F# 3.1 is not
> installed and indicate that this is the problem.
Does XS require F# 3.1? Why wouldn't it be compatible with F# 3.0? VisualStudio can :-/
Andres, what does your fsproj look like?
It should look like this :-
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Program.fs" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" />
The template looks to see if 3.1 or 3.0 is installed and chooses the appropriate Microsoft.FSharp.Targets file. There isn't a specific version of FSharp.Core required.
Do you have any other folders in C:\Program Files (x86)\Microsoft SDKs\F# ?
> Andres, what does your fsproj look like?
What fsproj? Jason, take in account this bug is about creating a solution, not opening one. Because of this bug, no fsproj file is ever created.
> Do you have any other folders in C:\Program Files (x86)\Microsoft SDKs\F# ?
Nope, only folder inside the F# folder is C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0.
Had another brief look at this. I changed the new project dialog recently so it now tries to get the code dom from the language binding so it can verify the project name is valid for that language. That is currently failing on Windows with Xamarin Studio 6 preview 4 looking at the logs provided.
Looking at the F# addin it defines the code dom type for its language binding to be FSharp.Compiler.CodeDom.FSharpCleanCodeProvider. So presumably this type is found in the FSharp.Compiler.CodeDom.dll that ships with the F# addin. Looking at the FSharp.Compiler.CodeDom.dll assembly it references FSharp.Core, Version=18.104.22.168. The F# addin itself includes FSharp.Core, Version=22.214.171.124. So presumably this will only work if FSharp.Core 4.3.1 is available from another install of F# which adds that assembly to the GAC. If FSharp.Compiler.CodeDom referenced FSharp.Core 4.3.0 then I guess it would work.
I changed the default version of FSharp.Core https://github.com/fsharp/xamarin-monodevelop-fsharp-addin/pull/186/files to 126.96.36.199
Would it be possible for you to build from source and see if this works? The only way I know of to get just F# 3.0 installed is to create a new Windows install with just VS2012 installed.
I renamed the F# 3.1 and 4.0 folders on my machine and it seemed to work ok - but I'm not sure what GAC versions were floating around.
*** Bug 38431 has been marked as a duplicate of this bug. ***
*** Bug 38924 has been marked as a duplicate of this bug. ***
FSharp.Core 188.8.131.52 is now bundled with the plugin https://github.com/fsharp/xamarin-monodevelop-fsharp-addin/commit/235e5eb269f0f0c565dd458d1b2c55aad16f2baa, and assembly binding redirects are in place in XS to make sure that this version is used.
> FSharp.Core 184.108.40.206 is now bundled with the plugin
What version of XS did that land on? I ask because I'm testing XS6.0 build 4520 and it still fails.
The FSharp.Core fix landed after the first alpha.
I tested Xamarin Studio 220.127.116.1171 although the original binding redirects were added around version 4550.
Ok, looking forward to the next version then.
With XS6.0 build 4761 this bug doesn't happen anymore (I can create new F# projects now, yay!). However, they don't compile, so I've opened a new bug report: bug 39575.