Dear all,
I am trying to use a .NET assembly provided by Thorlabs which can be used to control one of their cameras. However, when I load the example vi, I am getting this warning:
- Expected Assembly "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", but found "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089."
And when I run the VI, it returns error 1172.
A few things I already found out:
- LabVIEW is using .NET v4.0.30319 by default. I tried to force it to v2.0.50727 using this KB: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kG83SAE (v2.0.50727 is present on the PC in C:\Windows\Microsoft.NET\Framework). Didn't solve the problem.
- I also tried the workaround as described in the labVIEW help: http://zone.ni.com/reference/en-XX/help/371361M-01/lvhowto/configuring_clr_version/ . Didn't help. It seems strange to me that version 4 is referenced in that config file, is that correct?
- I found that Systems.Windows.Forms.dll is located in C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089. I created a folder v2.0_2.0.0.0__b77a5c561934e089 in C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Forms and copied Systems.Windows.Forms.dll into it from C:\Windows\Microsoft.NET\Framework\v2.0.50727. Didn't help.
- I am admin on the PC, it's Windows 7, LabVIEW 2014 32 bit.
- The Thorcam application installer doesn't allow you to install the 32 bit version on a 64 bit machine, but the 64 bit version includes examples and dll's for 32 bit;
Has anyone seen this before? Is there a solution?
Kind regards,
Joszz