I have a zero touch node package that I am developing in Visual studio. I don’t get an error message, as the library compiles just fine The trouble is (I think) in Dynamo. My package includes the compiled library and a locally copied dll from another company. The package needs to make a connection with that software (FEM calculation software) and therefore I added a reference. The RFEM dll is ‘as it is’ and I cannot change it.
Option 1: Setting copy local to true
On debugging, I copy the dll’s (both) to the packages folder using:
xcopy /Y “(TargetDir)*.*" "(AppData)\Dynamo\Dynamo Core\2.0\packages$(ProjectName)\bin”
xcopy /Y “(ProjectDir)pkg.json" "(AppData)\Dynamo\Dynamo Core\2.0\packages$(ProjectName)”
And I start Dynamo. I then get:
So the package is installed, but it isn’t visible under ‘add-ons’. I can add the library manually though, and then it will work just fine:
But this is inconvenient behavior of course.
Option 2: Setting copy local to false
I can also add the reference with copy local = true. In that case when Dynamo is started, the addon is visible immediately on the left, but I get this error message:
So the only things I changed in between these two tests:
- The setting for copy local
- I cleared the ArcadisDynamo2RFEM package folder so the contents are empty
- I recompile the library
- When I add a random other dll I do not have this problem!
- I do not know if it is relevant, but as you can see in the pictures I also have an ExplicitCustomNodes package. If I add the RFEM reference in that project, I get the same problem with the package not showing up under ‘add-ons’
- I don’t remember having this issue with Dynamo 1.3. The project was set up in the same way
Finally, I do have a warning in Visual Studio. Might this be relevant?
Warning There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference “Dlubal.RFEM5, Version=184.108.40.206, Culture=neutral, PublicKeyToken=f22b2f92593d105e, processorArchitecture=MSIL”, “AMD64”. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. ArcadisDynamo2Rfem
Thanks Michael for your help!