Build error: FSC: error FS2024: Static linking may not use assembly that targets different profile with OxyPlot example and FsXaml when using VS2015 Update 2. .NET 4.6.x. I attached the VS project.
SimpleDemoFsharp (2).zip
Repro steps
Program.fs:
open System
open System.Windows
open FsXaml
// Comment out to build:
type MainWin = XAML<"MainWindow.xaml">
[<STAThread>]
[<EntryPoint>]
let main argv =
// Comment out to build:
let app = Application()
let win = MainWin()
app.Run win
MainViewModel.fs:
namespace SimpleDemoFsharp
open OxyPlot
open OxyPlot.Series
type MainViewModel() =
let myModel = PlotModel()
//comment below to build an empty window with FSXAML:
do
myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)"))
member mainWindow.MyModel with get() = myModel
When loading the XAML directly, oxyplot creates the chart.
When loading the XAML via FSXAML, the project won't build.
When uncommenting the myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)")) line the project compiles.
Description
Build error: FSC: error FS2024: Static linking may not use assembly that targets different profile with OxyPlot example and FsXaml when using VS2015 Update 2. .NET 4.6.x. I attached the VS project. SimpleDemoFsharp (2).zip
Repro steps
Program.fs:
MainViewModel.fs:
XAML:
Expected behavior
Show oxyplot plotmodel when using FSXAML.
Actual behavior
When loading the XAML directly, oxyplot creates the chart. When loading the XAML via FSXAML, the project won't build. When uncommenting the myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)")) line the project compiles.