johnpierson / RhythmForDynamo

A collection of nodes for use in Dynamo with Revit.
BSD 3-Clause "New" or "Revised" License
108 stars 25 forks source link

dependency conflict #28

Closed Thomas84 closed 4 years ago

Thomas84 commented 4 years ago

Describe the bug in Dynamo there is an error in the log and I cannot place nodes anymore, as soon as the rhythm package is active.

look at line 80, 82, 85, 87 rhythm_conflict_library.txt

Translation: During the loading of the Assembly RhythmRevit, Version=2020.7.25.0, Culture=neutral, PublicKeyToken=null Dynamo has recoginzed, that the dependency AdWindows, Version=2018.11.1.0, Culture=neutral, PublicKeyToken=null is already loaded with an incompatible version. This Assembly is probably loaded in another Revit Add-in. Please uninstall other add-ins and restart Dynamo. Dynamo is in this state probably instable. The incompatible version was probably loaded for one of the following assemblies: UIFrameworkInterop, UIFramework, UIFrameworkServices, AdApplicationFrame, FabricationPartBrowser, RevitAPIUI, Autodesk.Revit.CloudRendering.Application, ConnectedDesktopUI, ContentDelivery, pyRevit_2021_982a2a80208ff7f8_PyRevitLabs.PyRevit.Runtime

The same with Xceed.Wpf.AvalonDock, Version=3.8.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4 used probably by UIFramework, pyRevit_2021_982a2a80208ff7f8_PyRevitLabs.PyRevit.Runtime, Microsoft.GeneratedCode

I will ask Ehsan to have look at this report, too. Thanks John!

My setup

Thomas84 commented 4 years ago

As soon as I deactivate pyRevit addin, I can place rhythm nodes and Dynamo works as expected, but there is still the error in the log (without mentioning the pyRevit addin). pyrevitdeactivated.txt image

After activating pyRevit again: image

johnpierson commented 4 years ago

So I believe the AdWindows error is ignorable and not the one that is causing the main error here.

A way to test this would be to remove the view extension XML in the extra folder.

I have had numerous issues when referencing Xceed Toolkit as Dynamo uses a different version than Revit and PyRevit uses a different version too. It's a mess.

Thomas84 commented 4 years ago

ok, I have renamed it to Rhythm_ViewExtensionDefinition._xml The AdWindows error is still there and it seems there are still Xceed.Wpf errors (also other packages and view extensions are generating errors as soon as I activate them) errors_rhythmVEdeactivated.txt

But only if pyRevit is active, I cannot place any nodes

johnpierson commented 4 years ago

Yeah, the dependency thing is not fun at all. But, I have published a new version of Rhythm that has no dependency on Xceed. Try this one out too and it should remove the error for Rhythm pertaining to Xceed. image


An additional part of this that is extremely difficult is that Dynamo shows those errors for stuff that can be ignored too. Take Rhythm for example. Right now, I support Revit 2018-2021. That means Rhythm needs to reference some sort of DLL for the API, and in my case, that is the lowest common denominator, 2018. This means that the moment you open Dynamo in something higher than 2018 you will see an error that, "Rhythm loaded an older version of RevitAPI.dll" or whatever.

That is why I say that a large number of these errors are ignorable. Because referencing an old Revit DLL is mostly going to be safe. Xceed is a special case because it renders the UI for Dynamo. So when a clash happens, Dynamo naturally takes a fall.

Unfortunately, I think this is a bigger issue than I can solve and should be brought up to the team, (reference this post perhaps).

Thomas84 commented 4 years ago

true. I have updated the rhythm package and your wpf error is gone, but pyRevit creates still a conflict. I will report it to the Dynamo team. Thanks John for your help! ( errors_dynamo_freezingWithPyRevit.txt

johnpierson commented 4 years ago

I do think it is related to this, https://github.com/DynamoDS/Dynamo/issues/8269

mjkkirschner commented 3 years ago

Hi @Thomas84 @johnpierson - Is there a relevant pyRevit issue for this conflict?

johnpierson commented 3 years ago

not that I know of. But I am not an avid pyrevit user, so I may not be the best person to weigh in.