Could not add reference to assembly IronPython.Wpf

Hello everyone, I made a tool in Python to serve my work. The problem is that this tool works in versions before Revit 2023. The strange thing is that my personal computer at home still works in Revit 2023. Only when using it on the company computer do I get the error as shown in the image below. Please help me with this problem. Thank you.
image

this bug has been fixed in some of the latest PR.
try any of the wip installers in the past week here

wip installers instructions

note: you will need a github account to grab the installer

Thanks @Jean-Marc . It works well.

@Luffy11 can you share which specific build you used that fixed the issue? We are experiencing the same error “Could not add reference to assembly IronPython.Wpf” in Revit 2024 regardless of the version of pyRevit. The error occurs with both:

  • The latest release: pyRevit_4.8.16.24121_admin_signed
  • The latest WIP: 4.8.17.24123+1613-wip:2711:2024.2.10

Please disregard, we were able to get it working by removing the reference to IronPython. We found some info elsewhere about the WPF functionality being part of the PresentationCore dll, and sure enough, everything still runs without a reference to IronPython.

# dependencies
import os
import clr
import System
from collections import defaultdict
clr.AddReference('PresentationCore')
clr.AddReference('PresentationFramework')
clr.AddReference('System.Windows.Forms')
clr.AddReference('IronPython.Wpf')
1 Like