Bug 33100 - Unable to create project or open file on Windows 10 due to F# addin exception.
Summary: Unable to create project or open file on Windows 10 due to F# addin exception.
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: F# Add-in ()
Version: 5.9
Hardware: PC Windows
: Normal normal
Target Milestone: 5.10 (C6)
Assignee: Dave Thomas
URL:
Depends on:
Blocks:
 
Reported: 2015-08-14 05:59 UTC by Matt Ward
Modified: 2015-10-13 05:49 UTC (History)
3 users (show)

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

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 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.

Related Links:
Status:
VERIFIED FIXED

Description Matt Ward 2015-08-14 05:59:48 UTC
This has been reported on the forums and I have the same problem on Windows 10. Trying to opening a file you see a Exception has been thrown by the target of an invocation message and the file is not opened.

The underlying exception is about an invalid culture. 

This seems to be because whilst testing bug #33008 I had set the current language for Xamarin Studio to explicitly by English. So it may well be a Xamarin Studio problem due to changes in Windows 10.

 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.FSharp.Compiler.SourceCodeServices.FSharpChecker' threw an exception. ---> System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Compiler-Service>.$Service' threw an exception. ---> System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Compiler-Service>.$Reactor' threw an exception. ---> System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: culture
    4096 (0x1000) is an invalid culture identifier.
       at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
       at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean useUserOverride)
       at Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.Reactor..ctor()
       at <StartupCode$FSharp-Compiler-Service>.$Reactor..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.get_theReactor()
       at Microsoft.FSharp.Compiler.SourceCodeServices.BackgroundCompiler..ctor(Int32 projectCacheSize, Boolean keepAssemblyContents, Boolean keepAllBackgroundResolutions)
       at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpChecker..ctor(Int32 projectCacheSize, Boolean keepAssemblyContents, Boolean keepAllBackgroundResolutions)
       at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpChecker.Create()
       at <StartupCode$FSharp-Compiler-Service>.$Service..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpChecker..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpChecker.Create()
       at FSharp.CompilerBinding.LanguageService..ctor(FSharpFunc`2 dirtyNotify)
       at <StartupCode$FSharpBinding>.$LanguageService.-cctor@71-1.Invoke(Unit unitVar)
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.FSharp.Control.LazyExtensions.Force[T](Lazy`1 )
       at MonoDevelop.FSharp.MDLanguageService.get_Instance()
       at MonoDevelop.FSharp.FSharpLanguageBinding..ctor()
       --- End of inner exception stack trace ---
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Mono.Addins.TypeExtensionNode.CreateInstance()
       at Mono.Addins.InstanceExtensionNode.GetInstance()
       at MonoDevelop.Projects.Extensions.LanguageBindingCodon.get_LanguageBinding()
       at MonoDevelop.Projects.LanguageBindingService.<CheckBindings>b__2(LanguageBindingCodon codon)
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at MonoDevelop.Projects.LanguageBindingService.CheckBindings()
       at MonoDevelop.Projects.LanguageBindingService.GetBindingPerLanguageName(String language)
       at MonoDevelop.Projects.DotNetProject.FindLanguage(String name)
       at MonoDevelop.Projects.DotNetProject..ctor(String languageName)
       at MonoDevelop.Projects.DotNetProject..ctor(String languageName, ProjectCreateInformation projectCreateInfo, XmlElement projectOptions)
       at MonoDevelop.Projects.PortableDotNetProject..ctor(String languageName, ProjectCreateInformation projectCreateInfo, XmlElement projectOptions)
       at MonoDevelop.Projects.PortableDotNetProjectBinding.CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
       at MonoDevelop.Projects.ProjectService.CreateProject(String type, ProjectCreateInformation info, XmlElement projectOptions)
       at MonoDevelop.Ide.Templates.ProjectDescriptor.CreateItem(ProjectCreateInformation projectCreateInformation, String defaultLanguage)
       at MonoDevelop.Ide.Templates.SolutionDescriptor.CreateEntry(ProjectCreateInformation projectCreateInformation, String defaultLanguage)
       at MonoDevelop.Ide.Templates.ProjectTemplate.CreateWorkspaceItem(ProjectCreateInformation cInfo)
       at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate(DefaultSolutionTemplate template, NewProjectConfiguration config, SolutionFolder parentFolder)
       at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate(SolutionTemplate template, NewProjectConfiguration config, SolutionFolder parentFolder)
       at MonoDevelop.Ide.Templates.TemplatingService.ProcessTemplate(SolutionTemplate template, NewProjectConfiguration config, SolutionFolder parentFolder)
       at MonoDevelop.Ide.Projects.NewProjectDialogController.CreateProject()
Comment 1 Sadik Ali 2015-08-14 10:23:59 UTC
I have checked this issue and able to reproduce the above behavior given in the bug description.When I create F# project it throw the exception.

Screencast: http://www.screencast.com/t/smdEIkNVDe
Ide Logs: https://gist.github.com/saurabh360/06a97f24bf082d08f343
Error: https://gist.github.com/saurabh360/498cb14b80f61f5f7600

Note: I have checked this issue on 3 Systems of Windows 10. But only 1 system throws exception. On other 2 systems, application Create/Open/build successfully.

Working environment: 
Screencast: http://screencast.com/t/CBNO6OFF8OD9
Environment Info: 
https://gist.github.com/Mohit-Kheterpal/038ba7df92bd823f7462

Non Working environment

Environment Info: === Xamarin Studio ===

Version 5.9.5 (build 9)
Installation UUID: 25bf900b-cf03-4345-86c6-97f36fb7fd84
Runtime:
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 5.1.5 (Business Edition)
Android SDK: D:\Android\android-sdk
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
Java SDK: C:\Program Files\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.4.4
Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

=== Build Information ===

Release ID: 509050009
Git revision: b99cb19a1d3b15d8980c4616f13f837457e5b292
Build date: 2015-07-28 02:41:02-04
Xamarin addins: d53d6eceb828422f3d4aff8547f2f6bab6c9ea58

=== Operating System ===

Windows 6.2.9200.0
Comment 2 Matt Ward 2015-08-14 10:38:26 UTC
This should be fixed in Xamarin Studio 5.10.0.556.

Fixing bug #33008 has also fixed this problem. Installing XS 5.10.0.556 and with the language set to English I can open a file without an error about an unsupported culture.
Comment 3 Tajinder Singh 2015-10-13 04:58:25 UTC
I have checked this issue with latest Cycle 6 builds. I am able create and build F# project on Windows 10 as shown in screencast : http://screencast.com/t/akGW9MkrhrqO

XS 5.10.0.814
XVS 4.0.0.577

Hence closing this issue.
Comment 4 Tajinder Singh 2015-10-13 05:49:16 UTC
Environment Info:
XamarinStudio-5.10.0.814_821142131bf287cc836a30b27187142b01c9535e
Xamarin.VisualStudio_4.0.0.1577_b78d0773b9efd134354c0c7446ea6804eb59ea3b