01-27-2011 11:40 AM
I installed LabWindows/CVI 8.5 and have used it for several months for creating .NET controllers for assemblies that are Microsoft .NET 2.0 platform.
Now, the provider of the assembly has upgraded to .NET 4.0.
I tried to generate the controller by pointing to the new assembly but an error message appears:
"Error occured while generating .NET controller code. Error in the application"
Does LabWindows/CVI 8.5 support .NET 4.0 assemblies?
Thanks!
Bye!
Ivan
Solved! Go to Solution.
01-28-2011 05:21 AM
Hi Ivan,
CVI 8.5 doesn't support .NET 4.0 Framework.
Have a nice day,
Simone
01-28-2011 05:30 AM
...And does CVI 2010 support .NET 4?
01-28-2011 03:56 PM - edited 01-28-2011 03:58 PM
Hello Ivan -
Because of some changes in the new version of the CLR that is a part of .NET Framework 4, you must now place a config file next to cvi.exe. I've attached the config file below. Once you've placed this file in CVI's installation directory (usually <program files>\national instruments\cvi85), you should be able to generate wrappers for .NET Framework 4 assemblies.
Also, note that any applications you create that call into .NET Framework 4 assemblies must also have this config file. You should copy the config file I've attached below, rename it to <your app name>.exe.config, and then place it in the same directory as your exe.
We've created a bug report (ID 283065) to better support .NET Framework 4 for future versions of CVI.
Let me know if you have any questions,
NickB
National Instruments
01-29-2011 04:21 PM
OK! ...but I cannot see the attachment.
Could you please send it one more time?
01-29-2011 05:46 PM
oops... You can't see it because I forgot to attach it. My apologies 🙂
NickB
National Instruments
01-31-2011 08:09 AM
Emm... I made a step forward but it's still no working.
CVI is now able to analyze the contents of the assembly...
...but, when I press OK the following message appears:
Any idea?
Thank you!
01-31-2011 09:13 AM
Hmm... It's not entirely clear why that error message would be shown. Something is throwing a NotImplementedException as we're generating the wrapper for this code, but it's not from our layer. Do you think you could post the assembly to our ftp site ftp://ftp.ni.com/incoming (it's write-only and behind our firewall) so that we can take a look in the debugger?
Thanks -
NickB
National Instruments
02-01-2011 02:48 AM
Hi!
I just uploaded to your FTP server. It's in a zip called NET4Problem.zip.
The assembly Electrolux.CTI.CycleManager.dll is the one i would like to access from CVI.
The other assemblies in the zip: CycleManager depends on the other dlls in that directory.
The subdir ConfigFiles is used at runtime by the assemblies Bases,dll and Selectors.dll.
Thank you very much!
Regards
Ivan
02-01-2011 05:25 AM
Hi!
I have to make a clarification:
Did you mean that the cvi.exe.config should have worked also with 8.5?
For us, it would be better to work with 8.5 and fix the problem on that version.
Thank you very much!
Best Regards
Ivan Muzzolini
Electrolux