fsharp.Core の wp7 バージョン ( Windows Phone 7.1 および F# 3.0 用の FSharp.Core ) をビルドするために、fsharp コンパイラのソース コードをいじってみましたが、ある時点であきらめて、移植可能なものを作ろうとし始めました。バージョンは代わりに wp7 で動作します。FX_NO_STRUCTURAL_EQUALITY
定義をターゲット フレームワークに追加しましたportable-net4+sl4+wp71+win8
。これが実行時に動作しない原因のようで、FSharp.Core.dll をC:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\.NETPortable
カスタム バージョンに置き換えようとしました。しかし、Visual Studio でコンパイルすると、次のエラーが発生します。
Warning 1 The primary reference "FSharp.Core" could not be resolved because it has an indirect dependency on the framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile47". To resolve this problem, either remove the reference "FSharp.Core" or retarget your application to a framework version which contains "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1578 5 FSharp.Data.Portable
Warning 3 The primary reference "FSharp.Core" could not be resolved because it has an indirect dependency on the framework assembly "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile47". To resolve this problem, either remove the reference "FSharp.Core" or retarget your application to a framework version which contains "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1578 5 FSharp.Data.Portable
Warning 2 The primary reference "FSharp.Core" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile47". To resolve this problem, either remove the reference "FSharp.Core" or retarget your application to a framework version which contains "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1578 5 FSharp.Data.Portable
問題は、VS2012 に付属している移植可能な FSharp.Core が mscorlib.dll、System.dll、および System.Core.dll の移植可能な 2.0.5.0 バージョンに依存しているということですが、ソースからコンパイルしたものは非移植性に依存しています。 4.0.0.0 バージョン。ソースからポータブル バージョンを正常にビルドした人はいますか?