Revit 2025 plugin using System.Windows.Forms.DataVisualization

Revit 2025 plugin using System.Windows.Forms.DataVisualization

jason.horsman
Explorer Explorer
660 Views
1 Reply
Message 1 of 2

Revit 2025 plugin using System.Windows.Forms.DataVisualization

jason.horsman
Explorer
Explorer

I have a plugin that supports multiple years of Revit (currently 2021-2024) and I'm trying to add support for Revit 2025. I have created a new project that targets the net8.0-windows framework. We have some code in a support library that uses the System.Windows.Forms.DataVisualization framework to create a doughnut chart. When the code gets to that point in executing I get an exception like below:

System.BadImageFormatException: 'Could not load file or assembly 'System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Reference assemblies cannot be loaded for execution. (0x80131058)'

This is the only code that is not working under the Revit 2025 API. Should it work? Is there a better chart replacement that would be compatible with the Revit 2025 API?

0 Likes
661 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

It seems that is a known issue. I searched for "DataVisualization.dll .net" and found several helpful notes on it:

  

  

This article looks especially promising to me:

  

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes