LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems loading .NET assemblies

Solved!
Go to solution

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.

 

螢幕擷取畫面 2024-11-07 162531.png

0 Kudos
Message 1 of 5
(87 Views)
Solution
Accepted by topic author wayneshen3113

You assembly was targeted exclusively for x86, but you are in x64 environment: (and by the way for .NET Frameworks 2.0).

Screenshot 2024-11-07 10.56.34.png

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:

Screenshot 2024-11-07 10.58.48.png

Try this one from the attachment.

 

0 Kudos
Message 2 of 5
(69 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 5
(51 Views)

Hi Andrey,

 

wow!  It is working now.

 

Thank you~~~~ 

0 Kudos
Message 4 of 5
(17 Views)

Hi rolfk,

 

Thank you for willing to repond my problems.

0 Kudos
Message 5 of 5
(15 Views)