11-07-2024 02:32 AM
Hello eveyone,
I got a dll(C#) form a instrument vendor and I want to use this assembly file to build a automation measurement program.
However, I encounter a issue that I can't load this dll correctly, It showed "An error occured trying to load the assembly"
I had tryied this steps in belowed pages, but no luck.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YIQoCAO&l=zh-TW
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8XnSAK&l=zh-TW
The assembly file is attached.
Please help me. Thank you.
Solved! Go to Solution.
11-07-2024 04:11 AM - edited 11-07-2024 04:16 AM
You assembly was targeted exclusively for x86, but you are in x64 environment: (and by the way for .NET Frameworks 2.0).
I recompiled it for AnyCPU using .NET Framework 4.8.1. Also added "Test" method. Version increased to 1.0.0.1, now should work:
Try this one from the attachment.
11-07-2024 05:51 AM - edited 11-07-2024 05:52 AM
It didn't load for me in LabVIEW 2020 SP1 32-bit. And JetBrains dotPeek claimed it was linking to MS .Net 4.0.0 but I did not investigate beyond that.
11-07-2024 09:16 PM
Hi Andrey,
wow! It is working now.
Thank you~~~~
11-07-2024 09:17 PM
Hi rolfk,
Thank you for willing to repond my problems.