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

System.IO.FileLoadException - assembly RhythmRevit - AdWindows #29

Closed Teun1 closed 3 years ago

Teun1 commented 3 years ago

When using Revit 2021 and your latest Package, we get a notification. It actually made Dynamo less stable. So hopefully it's an easy fix.

System.IO.FileLoadException

Dynamo has detected a conflict with a dependency and may be unstable. If any issues are detected, please uninstall addins or packages and contact the provider.

While loading assembly RhythmRevit, Version=2020.9.8.0, Culture=neutral, PublicKeyToken=null, Dynamo detected that the dependency AdWindows, Version=2018.11.1.0, Culture=neutral, PublicKeyToken=null was already loaded with an incompatiable version. It is likely that another Revit Addin has loaded this assembly, please try uninstalling other Addins, and starting Dynamo again. Dynamo may be unstable in this state. It is likely one of the following assemblies loaded the incompatible version: UIFrameworkInterop, UIFramework, UIFrameworkServices, AdApplicationFrame, FabricationPartBrowser, RevitAPIUI, Autodesk.Revit.CloudRendering.Application, ConnectedDesktopUI, ContentDelivery

Teun1 commented 3 years ago

image

perhaps this is part of our problem?

I changed 2 Clockwork nodes so Dynamo wouldn't crash TimeSpan.LapTime and TimeSpan.EvaluateLapTimes But I'am not sure this is what the real problem is. What do you think?

johnpierson commented 3 years ago

The two issues you reference are not related to each other.

Problem 1:

For Rhythm, I ship it with the lowest APIs referenced. In your case, you are seeing the Autodesk Windows library error. This means that I am referencing the 2018 version and you are loading the 2021 version.

Keeping that in mind, the first error is ignorable and has been discussed at length here. TLDR: Dynamo's way of handling already loaded DLLs (even when there is no clash) is a disaster.


Problem 2:

For the clockwork error, it is because he is strong typing the type of data he wants and it is clashing with my Rhythm DateTime class. I can make a change for this but it won't be immediate.

In the meantime, you can change that one to the following: image

Teun1 commented 3 years ago

Thanks for the reply. And for your Package! We have been enjoying it for years. I normally ignore the notifications. But this combination was strange. And Dynamo crashed. So I thought it was a good idea to give feedback. And about the first problem, hopefully the Dynamo team is able to prevent unimportant notifications in future.