Fail to Load two packages access to the same API

Thanks @RMohareb
That did it. The issue does reproduce.

Dynamo does not support the same type (uniquely identified by Type.FullName) to be imported from distinct assemblies.
ex. type RevitAPI.RevitUtils cannot be imported from both RevitAPI.dll and SomeOtherAssembly.dll

Now in this particular case it seems we have at least 2 embedded interop types with the same FullName (from CivilConnection and BriMohareb) but are considered distinct by dotnet, so Dynamo will not allow it (based on the constraint mentioned above)

It does seem like the best course of action is to avoid embedding those interop types, if possible

1 Like

Hi @tiberiu.pinzariu ,
is any other way to overcome this problem?
@mzjensen already solve it by use late binding and it is worke.

Did you had open source github ?

1 Like

@chuongmep not yet

We currently donā€™t have any other way to fix this scenario. The best course of action is to do what @mzjensen said.

We will probably add this to the best practices documentation for dynamo authors.

Thank you both,
Tibi

3 Likes

We have added guidelines for using COM types in Dynamo
It basically suggests the steps described in this thread.

2 Likes

@tiberiu.pinzariu

is this thread change in Dynamo 3?

Hi @RMohareb
The COM interop documentation still applies going forward (including Dynamo 3.0)

3 Likes