LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2013: An error occured trying to load the assembly

Solved!
Go to solution

Hey all,

 

I'm trying to load a .NET 4.5 dll into LabVIEW 2013.

When I place any of the .NET VIs and try to select the one I'm after it says "An error occured trying to load the assembly" and won't let me load it.

I also tried importing the dll, but that gave errors too.

It's defintely a .NET 4.5 dll as the .NET reflector gives me

 

[assembly: ComVisible(false)] [assembly: TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName=".NET Framework 4.5")] [assembly: SecurityRules(SecurityRuleSet.Level1)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification=true)]

 

To try and get around the import issue, I added the following to my LabVIEW.exe.config file

<?xml version ="1.0"?>
<configuration>
  <runtime>
    <loadFromRemoteSources enabled="true" />
  </runtime>
</configuration>

but it made no difference.

 

 

Any suggestions? All the things I've read so far are for 2010.

0 Kudos
Message 1 of 14
(9,244 Views)

I had the same issue a while back.  Unfortunately mine magically resolved itself, but I made a post with what I'd been reading and got a reply with another suggested link.  It sounds like you've gone down the same road, but I figure every little bit helps:

http://forums.ni.com/t5/LabVIEW/Error-Loading-NET-Assembly-in-2013/m-p/2521098

 

Message 2 of 14
(9,204 Views)

@Wart wrote:

I had the same issue a while back.  Unfortunately mine magically resolved itself, but I made a post with what I'd been reading and got a reply with another suggested link.  It sounds like you've gone down the same road, but I figure every little bit helps:

http://forums.ni.com/t5/LabVIEW/Error-Loading-NET-Assembly-in-2013/m-p/2521098

 


Thanks.

Hopefully mine will resolve itself too. LV2013 is meant to support the newer stuff without me having to mess about.
We shall see...

0 Kudos
Message 3 of 14
(9,191 Views)

@Hornless.Rhino wrote:

@Wart wrote:

I had the same issue a while back.  Unfortunately mine magically resolved itself, but I made a post with what I'd been reading and got a reply with another suggested link.  It sounds like you've gone down the same road, but I figure every little bit helps:

http://forums.ni.com/t5/LabVIEW/Error-Loading-NET-Assembly-in-2013/m-p/2521098

 


Thanks.

Hopefully mine will resolve itself too. LV2013 is meant to support the newer stuff without me having to mess about.
We shall see...


So far no dice.

It's really bizarre. It works with sample c# code in visual studio (see link below), but for some reason LabVIEW doesn't like the dll (tried both LV 2012 and 2013).


Sample code (not mine) is available at http://elbruno.com/2013/12/01/kinectone-hello-world-with-kinectsdk-v2-body-count/

0 Kudos
Message 4 of 14
(9,106 Views)
Solution
Accepted by topic author Hornless.Rhino

SOLVED!!!!!!!!!!

 

I installed a 64bit version of LabVIEW and it works. HUZZAH!

Message 5 of 14
(9,053 Views)

Hi,

 

Just in case it's useful to anyone else, I had this problem and the error turned out to be that the DLL I was calling called another DLL which was not present in the same folder. Once all files were in the same folder, it worked fine.

 

Cheers

 

ed

Message 6 of 14
(8,692 Views)

I'm facing the same problem with a .NET DLL, LabVIEW 2015 and Windows 10.

The DLL can be loaded on one PC, but it gives me an error on the other one. Both PCs have the same LabVIEW version installed and run on Windows 10.

 

Does anyone have any idea?

0 Kudos
Message 7 of 14
(7,936 Views)

Hello David,

 

Is the DLL in the same exact directory with respect to the calling VI as the VI that works?

 

The following article may be useful:

 

http://digital.ni.com/public.nsf/allkb/C4EA5ABBEB67AF7C862573F3004D4421

0 Kudos
Message 8 of 14
(7,900 Views)

Hi David,

 

One other thing to watch out for is that all the files are on a local drive. There are security restrictions to do with code being called from network drives.

 

Good luck.


Ed

0 Kudos
Message 9 of 14
(7,880 Views)

Hi Roxana

 

Yes, the DLL is located in the same directory as the calling VI. The exact same code on another PC works, respectively the DLL can be loaded.

 

Regards,

David

0 Kudos
Message 10 of 14
(7,874 Views)