Search code examples
c#oxyplot

C# Oxyplot version conflict / set connectionId error


I am using OxyPlot in a project in visual studio 2015 and .NET 4.6.2. Adding OxyPlot/Oxyplot.Wpf through Nuget it shows and installs version 1.0.0. However when building the app I get a conflict between Oxyplot version 1.0.0.0 and 2014.1.546.0 and the program breaks at

InitializeComponent();

in MainWindow() constructor, pointing to the line with

xmlns:oxy="http://oxyplot.org/wpf"

in the Mainwindow.xaml file, throwing an "System.Windows.Markup.XamlParseException" in PresentaionFramework.dll ("Set connectionId threw an exception"). I just assume these two are connected. I have tried removing and reinstalling OxyPlot and cleaning the project and solution,... Anyone who knows or have ideas on what could be done?


Solution

  • There was some leftover of an older version that didn't seem to go away and I found out that I could edit App.config manually and set

    <bindingRedirect oldVersion="0.0.0.0-2014.1.435.0" newVersion="1.0.0.0">
    

    and that made all the difference.