LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET DLL System.BadImageFormatException

Solved!
Go to solution

Dear All, 

I want to use .NET dll from DMX NicoClaudie Architectural. But I found the problem System.BadImageFormat Exception. I already reading through many post in forum . I tried several solution like this solution from this post :

https://forums.ni.com/t5/LabVIEW/NET-DLL-System-BadImageFormatException/td-p/1829383

After making config file , but its not working either. 

I already checked the .NET that used by this apps , they used NET 4.0 and amd 64. 

Do you have suggestion for me   ? Maybe I'm missing something . Thank You . 

 

0 Kudos
Message 1 of 4
(1,980 Views)

So the .Net assembly is using amd64 code! Are you also using LabVIEW 64-bit to access this assembly then? You can not mix and match x86 and x64/amd64 code in the same process, also not in .Net.

 

Only when an assembly is compiled fully as CIL, can it be loaded in either environment. Mixed mode or binary assemblies need to match the environment in which you want to load them.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 4
(1,965 Views)

Yes sir . I'm using LabVIEW 64 bit . But still encountering same problem . 

0 Kudos
Message 3 of 4
(1,954 Views)
Solution
Accepted by topic author Gabess

Dont use constructor node for calling dll. 

I figured it out using Call library function node . 

0 Kudos
Message 4 of 4
(1,908 Views)