LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Loading .NET Assembly in 2013

I've been using the WinSCP .NET & COM library in LabVIEW 2011 for a while with great success.  However I haven't been able to make it work with 2013.  I get the attached error when attempting to open the DLL using the .NET Constructor Node.  The change from CLR 2.0 to 4.0 is covered in the migrating code document as a change from LV2012 to LV2013.  It refers to the following help file:

http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/configuring_clr_version/

 

I've followed the directions in the help file, but I still get the same attached error.  My understanding was that the 4.0 version of the CLR generally supported older dlls once the config file was created.  Am I overlooking something or do I just need to hope that the winSCP DLL gets updates to support CLR 4.0?

 

Edit: I should add this is double frustrating because I just made a really slick class to handle all the work! 😛

0 Kudos
Message 1 of 3
(5,112 Views)

That error message is non-specific enough to be really frustrating, I suppose.

I can't address your (non) specific error, but when I had DLL compatibility issues in the past in LV 2011 and 2012 I viewed the manifest of the DLL causing issues to see what version of the CLR it expected. The manifest can be seen with the Depends tool from microsoft or with the disassembler ildasm.exe (if the DLL has a manifest built into it i.e. from C# or similar tool). These tools can be obtained from Microsoft or may come with your MS visual studio IDE.

Then you can create a config XML file to tell your LV executable to load using a specific CLR version (i.e. 4.0 or 4.5 or even more specifically a build version).

 read more here.

http://digital.ni.com/public.nsf/allkb/32B0BA28A72AA87D8625782600737DE9?OpenDocument

 

I had an odd occurrence where I rebuilt a DLL to use what I supposed was the default LV 2012 CLR version, it still wanted the config XML file before it would open up and run the DLL correctly. I did not resolve that question, I just left the config XML file in there.

Hope this helps, or is in some way related to your question.

0 Kudos
Message 2 of 3
(5,060 Views)

Denver - thanks for your insight.

 

However, my issue seems to have magically resolved itself as of today.  I'd rebooted and tried everything I could find - today I gave it another shot and things work.  I'll have to blame it on the corporate overlords who control my computer.  Smiley Mad

 

I ended up not even needing the .config file.

0 Kudos
Message 3 of 3
(5,034 Views)