2014-11-04 33 views
2

我在Windows Phone 8.1(通用)項目中使用F#PCL庫。對於FSharp.Core程序集使用MissingManifestResourceException

我已將F#PCL庫引用爲項目。我還引用了FSharp.Core程序集,因爲我需要使用它的一些類型(爲了與我的F#PCL進行通信)。我使用對創建新的F#PCL項目時默認使用的相同物理程序集(C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ FSharp.NETCore \ 3.259.3.1 \ FSharp.Core.dll)的引用。

只要我建立在除Release-ARM以外的任何其他配置中,一切都可以正常工作。但是當我切換到Release-ARM配置時(我認爲這是由Store提供給用戶的,基於從Store直接下載的應用程序的行爲),所有的地獄崩潰了。

當我嘗試訪問List.sortBy功能,我得到以下錯誤:

Error Code:

-2146233036

Error Message:

The type initializer for 'FastGenericComparerTable`1' threw an exception.

Line Number:

FSharp.Core

Stack Trace: at Microsoft.FSharp.Core.LanguagePrimitives.FastGenericComparerCanBeNullT at Microsoft.FSharp.Primitives.Basics.Array.stableSortWithKeys[T,TKey](T[] array, TKey[] keys) at Microsoft.FSharp.Primitives.Basics.Array.stableSortInPlaceBy[T,TKey](FSharpFunc 2 projection, T[] array) at Microsoft.FSharp.Collections.ListModule.SortBy[T,TKey](FSharpFunc 2 projection, FSharpList 1 list) at TaskCrunch.Data.ChildEntityTransforms.reorderTree[a](FSharpFunc 2 sortFunc, FSharpList 1 xs) at TaskCrunch.Data.ChildEntityTransforms.children(toDo x, FSharpList 1 ys, FSharpList 1 accumulated) at [email protected](FSharpList 1 ys, FSharpList 1 resultSoFar) at TaskCrunch.Universal.ViewModel.ProjectDetailViewModel.<SortTasks>d__5c.MoveNext() ----- INNER EXCEPTION ------ Message: The type initializer for '<StartupCode$FSharp-Core>.$Prim-types' threw an exception. Source: FSharp.Core StackTrace: at [email protected][T](Type matchValue, Unit unitVar) at Microsoft.FSharp.Core.LanguagePrimitives.FastGenericComparerTable 1..cctor() HResult: -2146233036 HelpLink: Unknown

----- INNER EXCEPTION ------ Message: Exception of type 'System.Resources.MissingManifestResourceException' was thrown. Source: mscorlib StackTrace: at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at .$Prim-types..cctor() HResult: -2146233038 HelpLink: Unknown

奇怪的是,這似乎並沒有成爲我到FSharp.Core第一個電話,因爲我所謂的名單。映射函數在它之前,似乎執行。

我懷疑在構建過程中出現了問題,但我不確定在哪裏尋找。我已經嘗試從頭重新創建F#PCL庫無濟於事。

+0

那麼打開這個bug,看起來很傷心。它發生了兩次轟炸,第二次發生故障時它試圖告訴你爲什麼發生第一次例外。先鋒們背上有箭。 – 2014-11-04 23:17:41

回答

0

這可能是VS F#便攜式配置文件支持中的一個錯誤。可能是一個編譯器錯誤(某種程度上,這個版本的FSharp.Core沒有正確地安裝到可移植的配置文件中),或者可能是一個項目系統錯誤(某種需要的編譯輸出沒有爲ARM正確創建)。

我會建議在https://visualfsharp.codeplex.com/

相關問題