This question is actually two separate ones as stated in the topic but very related. So I thought posting them in one topic.
I have developed a Zerotouch library that is using a third party library. I have set the Copy Local property for the third party library to
true (cause otherwise I get error messages on loading via Import Library). With this setting I can import my dll through Import Library command. And I get the nodes that are referencing the third party library and they work as expected. However, I get some nodes that are methods of the other referenced libraries such as Dynamo.Core and Dynamo.Graph (which I have also used). Also the UI nodes don’t load properly, which I think is an expected behaviour(?).
When I try loading my library as a package (and by that I mean creating the folders “bin”, “dyf”, “extra”, copying the pkg.json to the root folder and copying the dlls into the bin folder and opening Dynamo) the only nodes that load are the UI nodes which work fine. But other public methods which have referenced the third party dll don’t even load.
Could someone please explain this behaviour and provide the solution?
What I have tried so far was trying to delete the issue by embedding the third party dll into my own using ILMerge which didn’t get anywhere. Then I tried to add the third party dll as a resource which I then can load using
GetManifestResourceStream() and the
AppDomain.CurrentDomain.AssemblyResolve event. This also didn’t come to any help.