ksobon / archilab

this is archi-lab.net dynamo repo
74 stars 20 forks source link

conflict with interactivity dll from Blend SDK #56

Closed ksobon closed 4 years ago

ksobon commented 4 years ago

According to this comment it can be fixed like so:

You are using the System library.Windows.Interactivity.dll that you took from the Blend SDK. However, all other products use this library from the public NuGet package. As a result, Dynamo does not work in the presence of your package of nodes and other plugins. Please use the correct library https://www.nuget.org/packages/System.Windows.Interactivity.WPF/

mjkkirschner commented 4 years ago

Hi @ksobon I don't know where this comment is from - but I don't think it is so simple. please see this thread for my findings on how to reproduce this issue - it requires your package, dynamo, and another addin to all interact.

https://github.com/DynamoDS/Dynamo/issues/10118

In newer versions of Dynamo we have actually updated to the version of the dll you are using! As Revit also ships this version we decided to align.

The nuget package is not maintained by MS - and this entire library has now been renamed and opensourced! https://www.nuget.org/packages/Microsoft.Xaml.Behaviors.Wpf/

My intention for Dynamo is to eventually remove this dependency.

ksobon commented 4 years ago

@mjkkirschner totally agree on trying to get rid of the dependency here. The comment came from someone on my blog, I was going to have a look at it to confirm that it works, but I agree, It's not as simple as replacing the DLLs. I tried that before with XCeed and EOWebBrowser etc.

Good job on aligning the versions. I try to do that whenever possible. Getting Revit team to update anything on their side might not be possible, so I like removing the dependency the best here. I can do the same on my end.

mjkkirschner commented 4 years ago

@ksobon whats nice is that now that the dependency is open sourced as MIT one solution is to literally grab that code and embed it in your own namespace if you find that you need it. I took a few approaches here if you are also using eventTrigger you may find them useful:

https://github.com/DynamoDS/Dynamo/pull/10163 https://github.com/DynamoDS/Dynamo/pull/10171

one adds a simple eventTrigger attached property (reimplementing whats in system.windows.interactivity) - the other just grabs the required classes and sticks them in a new namespace.

ksobon commented 4 years ago

Final note here. Latest archi-lab.net package doesn't even have this dependency anymore. I am not using System.Windows.Interactivity because I got rid of some of the old nodes, that no one seemed to be using anyways. So perhaps the issue was that all of the dlls are loaded regardless if they are actually used by the packages or not. I did ship that dll, so if you guys load them all from the bin folder then, that could be the case.

ksobon commented 4 years ago

So the final outcome here is that I removed the System.Windows.Interactivity and any other not used dlls so that they are not conflicting with any other Dlls in Revit/Dynamo.

image