# Fail to Load two packages access to the same API

**URL:** <https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556>\
**Category:** Developers\
**Created:** [November 28, 2022, 2:21pm UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556 "2022-11-28T14:21:58Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![tiberiu.pinzariu](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tiberiu.pinzariu](https://forum.dynamobim.com/u/tiberiu.pinzariu)\
**Post date:** [March 15, 2023, 3:57pm UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/26 "2023-03-15T15:57:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RMohareb](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rmohareb/32/120534_2.png) [@RMohareb](https://forum.dynamobim.com/u/RMohareb)\
**Post date:** [March 16, 2023, 9:47am UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/27 "2023-03-16T09:47:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chuongmep](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/chuongmep/32/197537_2.png) [@chuongmep](https://forum.dynamobim.com/u/chuongmep)\
**Post date:** [March 16, 2023, 9:53am UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/28 "2023-03-16T09:53:45Z")

</div>

Did you had open source github ?

---

<div class="post-metadata">

**Author:** ![RMohareb](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rmohareb/32/120534_2.png) [@RMohareb](https://forum.dynamobim.com/u/RMohareb)\
**Post date:** [March 16, 2023, 9:55am UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/29 "2023-03-16T09:55:15Z")

</div>

@chuongmep not yet

---

<div class="post-metadata">

**Author:** ![tiberiu.pinzariu](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tiberiu.pinzariu](https://forum.dynamobim.com/u/tiberiu.pinzariu)\
**Post date:** [March 31, 2023, 2:17pm UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/30 "2023-03-31T14:17:47Z")

</div>

We currently don’t have any other way to fix this scenario. The best course of action is to do what @zachri.jensen said.

> [@zachri.jensen](#):
>
> I think it’s probably safe to say that it should be a best practice for us developers to use late binding when working with COM interop and Dynamo. That way it’s easier for the next developer in line and we don’t have a “first package loaded wins the race” scenario.

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

Thank you both,  
Tibi

---

<div class="post-metadata">

**Author:** ![tiberiu.pinzariu](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tiberiu.pinzariu](https://forum.dynamobim.com/u/tiberiu.pinzariu)\
**Post date:** [April 12, 2023, 3:42pm UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/31 "2023-04-12T15:42:26Z")

</div>

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

> **[Using COM (interop) types in dynamo packages](https://github.com/DynamoDS/Dynamo/wiki/Using-COM-(interop)-types-in-dynamo-packages)**
>
> Open Source Graphical Programming for Design. Contribute to DynamoDS/Dynamo development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![RMohareb](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rmohareb/32/120534_2.png) [@RMohareb](https://forum.dynamobim.com/u/RMohareb)\
**Post date:** [February 28, 2024, 3:12pm UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/32 "2024-02-28T15:12:06Z")

</div>

@tiberiu.pinzariu

> **[Using COM (interop) types in dynamo packages](https://github.com/DynamoDS/Dynamo/wiki/Using-COM-(interop)-types-in-dynamo-packages)**
>
> Open Source Graphical Programming for Design. Contribute to DynamoDS/Dynamo development by creating an account on GitHub.

is this thread change in Dynamo 3?

---

<div class="post-metadata">

**Author:** ![tiberiu.pinzariu](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tiberiu.pinzariu](https://forum.dynamobim.com/u/tiberiu.pinzariu)\
**Post date:** [February 28, 2024, 3:25pm UTC](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/33 "2024-02-28T15:25:31Z")

</div>

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

[Previous page](https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556.md?page=1)
