Strong Naming - If It's Not Supported What's Autodesk's Solution?

Strong Naming - If It's Not Supported What's Autodesk's Solution?

mastjaso
Advocate Advocate
698 Views
2 Replies
Message 1 of 3

Strong Naming - If It's Not Supported What's Autodesk's Solution?

mastjaso
Advocate
Advocate

So how does everyone else deal with the lack of Strong Naming when developing Revit Add-Ins?

 

If I can't use strong naming how can I verify that the assemblies that my program gets are actually the assemblies that it installed to disk? If I'm relying on a third party library like Serilog or Epplus, how do I know that my program is getting my copy of the Serilog/Epplus dll with the right version number, and not the add-in that loaded ahead of mine's copy which could be using a completely different version? Without strong naming I have no guarantee that I get the support DLLs that I expect at runtime which leads to all kinds of bizarre "Method Not Found" errors that you shouldn't get in a strongly typed language. 

 

This is the problem that Microsoft solved with strong naming, but apparently the Revit DLLs are not strongly named, and thus you can't use strong naming, but no alternative solution seems to be provided, so how does everyone else deal with this?

699 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Dear Jason,

 

Thank you for your query.

 

I already answered the same question in your comment on The Building Coder:

 

https://thebuildingcoder.typepad.com/blog/2014/01/no-inheritance-and-no-strong-naming.html#comment-4...

 

There are many possible solutions. One pretty radical one that always works is to use IPC to disentangle things:

 

https://thebuildingcoder.typepad.com/blog/2019/04/set-floor-level-and-use-ipc-for-disentanglement.ht...

 

Within your separate external process, you can do whatever you like, and then use IPC to make the required functionality available to your Revit add-in.

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

Anonymous
Not applicable

I'm also confused, there doesn't seem to be anything wrong with strongly naming the assembly, rather better.

0 Likes