FSC:错误 FS2024:静态链接可能无法使用以 oxyplot 示例和 FsXaml 为目标的不同配置文件的程序集
FSC: error FS2024: Static linking may not use assembly that targets different profile with oxyplot example and FsXaml
我将 oxyplot
与 fsxaml
和 gjallarhorn
一起使用。它在直接使用它并绑定到 DataPoint(x,y) 的输出时起作用。但是,当我尝试 SimpleDemoFsharp 中的以下示例时:
type MainViewModel() =
let myModel = PlotModel()
do
myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)"))
member mainWindow.MyModel with get() = myModel
构建失败 FSC: error FS2024: Static linking may not use assembly that targets different profile.
错误似乎是由这一行引起的:myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)"))
,如果我取消注释项目编译。我曾尝试以较低的 .NET 版本为目标,并创建新项目,但没有取得太大成功。有解决方法吗?从搜索结果看来,这可能导致了一些 PCL 配置文件问题。
该示例自行编译并运行(即没有安装其他 nuget 包,只安装了 oxyplot 和 oxyplot.wpf)。
编辑: 经过进一步测试,问题似乎出自 FsXaml 和 Oxyplot 的组合。例如,当尝试通过 FsXaml 加载 MainWindow.xaml 时。
来自 VS2015 的 fsc.exe 命令如下:
C:\Program Files (x86)\Microsoft SDKs\F#.0\Framework\v4.0\fsc.exe
-o:obj\x64\Debug\Gjallarhorn160611.exe -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin\Debug\Gjallarhorn160611.XML --optimize- --platform:x64 --resource:obj\x64\Debug\Gjallarhorn160611.g.resources -r:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\FSharp.NETFramework\v4.0.4.0.0\FSharp.Core.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\FsXaml.Wpf.2.1.0\lib\net45\FsXaml.Wpf.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\FsXaml.Wpf.2.1.0\lib\net45\FsXaml.Wpf.TypeProvider.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.Bindable.0.0.3-beta1\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Gjallarhorn.Bindable.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.Bindable.Wpf.0.0.3-beta1\lib\net45\Gjallarhorn.Bindable.Wpf.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.0.0.3-beta1\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Gjallarhorn.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Core.1.0.0-unstable2100\lib\net45\OxyPlot.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Wpf.1.0.0-unstable2100\lib\net45\OxyPlot.Wpf.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Wpf.1.0.0-unstable2100\lib\net45\OxyPlot.Xps.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationCore.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationFramework.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Numerics.dll"
-r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xaml.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xml.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\UIAutomationTypes.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\WindowsBase.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.Concurrent.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.Annotations.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.EventBasedAsync.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Contracts.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Debug.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Tools.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Tracing.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Dynamic.Runtime.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Globalization.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.IO.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Expressions.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Parallel.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Queryable.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.NetworkInformation.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.Primitives.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.Requests.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ObjectModel.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.ILGeneration.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.Lightweight.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Extensions.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Primitives.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Resources.ResourceManager.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Extensions.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.WindowsRuntime.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Numerics.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Json.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Primitives.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Xml.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Security.Principal.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Duplex.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Http.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.NetTcp.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Primitives.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Security.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.Encoding.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.Encoding.Extensions.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.RegularExpressions.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.Tasks.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.Tasks.Parallel.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.ReaderWriter.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.XDocument.dll"
-r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.XmlSerializer.dll"
--target:exe --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ --sqmsessionguid:9587e2f2-adad-4417-931b-00c055df82f8 "C:\Users\username\AppData\Local\Temp.NETFramework,Version=v4.5.AssemblyAttributes.fs"
AssemblyInfo.fs Model.fs Context3.fs Program.fs
很确定错误在:
Gjallarhorn.Bindable.dll
和
Gjallarhorn.dll
出于某种原因,您正在引用可移植库。
编辑路径以指向完整的 .net 版本
确实,PCL 和 Type Providers 不能一起玩。这似乎是由 VisualF# Issue 99 引起的。解决方法是将 ViewModel 代码移至单独的库。
我将 oxyplot
与 fsxaml
和 gjallarhorn
一起使用。它在直接使用它并绑定到 DataPoint(x,y) 的输出时起作用。但是,当我尝试 SimpleDemoFsharp 中的以下示例时:
type MainViewModel() =
let myModel = PlotModel()
do
myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)"))
member mainWindow.MyModel with get() = myModel
构建失败 FSC: error FS2024: Static linking may not use assembly that targets different profile.
错误似乎是由这一行引起的:myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)"))
,如果我取消注释项目编译。我曾尝试以较低的 .NET 版本为目标,并创建新项目,但没有取得太大成功。有解决方法吗?从搜索结果看来,这可能导致了一些 PCL 配置文件问题。
该示例自行编译并运行(即没有安装其他 nuget 包,只安装了 oxyplot 和 oxyplot.wpf)。
编辑: 经过进一步测试,问题似乎出自 FsXaml 和 Oxyplot 的组合。例如,当尝试通过 FsXaml 加载 MainWindow.xaml 时。
来自 VS2015 的 fsc.exe 命令如下:
C:\Program Files (x86)\Microsoft SDKs\F#.0\Framework\v4.0\fsc.exe -o:obj\x64\Debug\Gjallarhorn160611.exe -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin\Debug\Gjallarhorn160611.XML --optimize- --platform:x64 --resource:obj\x64\Debug\Gjallarhorn160611.g.resources -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp.NETFramework\v4.0.4.0.0\FSharp.Core.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\FsXaml.Wpf.2.1.0\lib\net45\FsXaml.Wpf.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\FsXaml.Wpf.2.1.0\lib\net45\FsXaml.Wpf.TypeProvider.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.Bindable.0.0.3-beta1\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Gjallarhorn.Bindable.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.Bindable.Wpf.0.0.3-beta1\lib\net45\Gjallarhorn.Bindable.Wpf.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.0.0.3-beta1\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Gjallarhorn.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Core.1.0.0-unstable2100\lib\net45\OxyPlot.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Wpf.1.0.0-unstable2100\lib\net45\OxyPlot.Wpf.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Wpf.1.0.0-unstable2100\lib\net45\OxyPlot.Xps.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationCore.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationFramework.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Numerics.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xaml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\UIAutomationTypes.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\WindowsBase.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.Concurrent.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.Annotations.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.EventBasedAsync.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Contracts.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Debug.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Tools.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Tracing.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Dynamic.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Globalization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.IO.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Expressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Parallel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Queryable.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.NetworkInformation.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.Requests.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ObjectModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.ILGeneration.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.Lightweight.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Resources.ResourceManager.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.WindowsRuntime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Json.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Security.Principal.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Duplex.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Http.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.NetTcp.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Security.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.Encoding.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.Encoding.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.RegularExpressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.Tasks.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.Tasks.Parallel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.ReaderWriter.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.XDocument.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.XmlSerializer.dll" --target:exe --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ --sqmsessionguid:9587e2f2-adad-4417-931b-00c055df82f8 "C:\Users\username\AppData\Local\Temp.NETFramework,Version=v4.5.AssemblyAttributes.fs" AssemblyInfo.fs Model.fs Context3.fs Program.fs
很确定错误在:
Gjallarhorn.Bindable.dll
和
Gjallarhorn.dll
出于某种原因,您正在引用可移植库。
编辑路径以指向完整的 .net 版本
确实,PCL 和 Type Providers 不能一起玩。这似乎是由 VisualF# Issue 99 引起的。解决方法是将 ViewModel 代码移至单独的库。