Nice3point / RevitToolkit

Toolkit for Revit plugin development
MIT License
59 stars 11 forks source link

Assembly resolver with 2025 #1

Closed russgreen closed 2 weeks ago

russgreen commented 4 months ago

Hi,

I love using the ExternalApplication implementation for the assembly resolution. Since I started using your toolkit I've had no issues with my addins using different versions of libraries.

I've compiled a fork so I can build for 2025 preview and noticed a potential problem.

I have two addins that both implement your toolkit and both use different versions of a 3rd party controls library (syncfusion). Both addins load and run in January preview just fine when tested one at a time. Both addins load and run in all previous version of Revit together just fine.

I need to call a method in the syncfusion library during onstartup.

Addin1 - newer version of syncfusion library - loads first - loads and runs OK. Addin2 - older version of syncfusion library - loads after addin1 - fails to load with a systemio.fileloadesxception and it cannot load the syncfusion assembly

renamed .addin files to change the load order. Addin 2 will now load and both addins function normally.

So seems the assembly resolve helper is not working the same way in Revit 2025.

Nice3point commented 4 months ago

I have not tested the Toolkit for Revit 2025 yet, it is not yet supported, I will investigate closer to April when the new version is scheduled for release. The order in which libraries are loaded is managed by Revit, RevitToolkit just resolves the dependencies for the "current" plugin being loaded. In your case, your better approach is to move the newer syncfusion version to the older plugins

SamllPigYanDong commented 2 weeks ago

Thank you very much for providing the 2025 Isolation API function. I would like to ask you why this API only takes effect in Revit 2025 and later versions. Is it because Revit's management mechanism has changed, or for some other reason?

Nice3point commented 2 weeks ago

@SamllPigYanDong Revit 2025 runs on .NET 8. Revit 2024 and older on .Net Framework, so this technology is not available in Framework