wpf - FSC: error FS2024: Static linking may not use assembly that targets different profile with oxyplot example and FsXaml -
i'm using oxyplot
fsxaml
, gjallarhorn
. works when using directly , binding output datapoint(x,y). when try following example simpledemofsharp:
type mainviewmodel() = let mymodel = plotmodel() mymodel.series.add(functionseries(cos, 0.0, 10.0, 0.1, "cos(x)")) member mainwindow.mymodel get() = mymodel
the build fails fsc: error fs2024: static linking may not use assembly targets different profile.
error appears caused line: mymodel.series.add(functionseries(cos, 0.0, 10.0, 0.1, "cos(x)"))
, if uncomment project compiles. have tried targetting lower .net versions, , creating fresh projects without success. there workaround? search appears maybe caused pcl profile issues.
the example on own compiles , works (i.e. no other nuget packages installed oxyplot , oxyplot.wpf).
edit: after further testing issue appears coming combination of fsxaml , oxyplot. example, when trying load mainwindow.xaml via fsxaml.
the fsc.exe command vs2015 below:
c:\program files (x86)\microsoft sdks\f#\4.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.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
indeed, pcl , type providers don't play nice together. appears caused visualf# issue 99. workaround move viewmodel code separate library.
Comments
Post a Comment