LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET 4 not detected by LabView

Solved!
Go to solution

Hello,

 

I am quite an inexperienced LabView user and have encountered the following problem: I get an error message every time I run Labview that LabView.exe initialization requires .NET version 4.0.3093 (I do have .NET 4). I tried adding the config file as instructed in the Support section but that did nothing. I am now reinstalling LabView altogether since when I installed it previously I only had .NET 3.5

 

What I need it for is to call a .dll created using Visual C# 2010. I've got it in 2 copies - built for .NET 2 and .NET 4. I've tried both using the Call Library Function Node and neither one works, I assume due to the above error message.

 

Am I missing something? Is there something else I should try?

 

Any advice would be most welcome, thank you!

0 Kudos
Message 1 of 11
(5,348 Views)

.Net calls need to be made using the "Constructor Node". Once placed, it will popup and ask you what assembly you wish to call. Simply point it to your DLL and you should be able to see the constructors available. Once you have selected your constructor and returned to the block diagram, right-click the refnum wire (top-right) coming out of the constructor node and you navigate to Create Property/Method for your object. Please let me know if you need additional help.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 2 of 11
(5,335 Views)

 .NET version 4.0.3093 (I do have .NET 4). is probably a typo in "LabVIEW.exe.config" 4.0.3.0913 is more commonSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 11
(5,334 Views)

Thanks Charles_CLA, I shall try it once my fresh install is done (shouldn't be long now)!

 

Also yes, it was a typo (end of work day kind of thing Smiley Happy )

 

Edit: I tried and I get the following error message when I use the constructor node (I had tried it yesterday as well and got the same):

 

"You must have .NET Framework 2.0 or later to use .NET functions and applications. Refer to the Microsoft web site at www.microsoft.com to download the .NET Framework"

 

Also I keep getting the same error from NI Update Service that it needs 4.0.30319.

0 Kudos
Message 4 of 11
(5,302 Views)

And one more thing: just like in my first install, I had errors installing Run-Time engine. No idea if it's related to my .NET problem though.

0 Kudos
Message 5 of 11
(5,291 Views)

There are also no .NET assemblies in the memory dialog box. I tried using the Options > Path bit to specify the path to Windows/Microsoft.NET but I still get error messages. Any suggestions?

0 Kudos
Message 6 of 11
(5,271 Views)
I don't think LabVIEW supports .NET 4 by default. Try this. No guarantees though. Create a text file called: LabVIEW exe.config Stick it next to the version of LabVIEW that you are using. In the file put the following: Regards.
0 Kudos
Message 7 of 11
(5,259 Views)

Thank you GGGT, but I've tried the .config fix (as suggested by the Support section) but it doesn't seem to work.

0 Kudos
Message 8 of 11
(5,257 Views)
Woops! Where did that go? I'll try attaching what I think you might need. Fingers crossed...
0 Kudos
Message 9 of 11
(5,256 Views)
Hmmm. Something very strange is going on here. Anyway, looks like you've already tried what I was trying to suggest. Sorry I wasn't of help. Regards.
0 Kudos
Message 10 of 11
(5,254 Views)