05-01-2012 01:38 PM
@kronik85 wrote:
Ok, I got it to work with an assembly NationalInstruments.Common 9.1.40.159.... It did not work with 9.1.20.159, or 9.1.35.159. All 3 are listed, although 9.1.20.159 and 9.1.35.159 are listed first, and together.
Thank you posting your solution, because it also worked for me.
Windows XP, Visual Basic 2010 Express, NI-488.2 v3.0.2, and NI-VISA v5.1.2
03-05-2014 10:48 AM
Okay, I am running windows 7 and developing under VS2010 professional and I have been able to compile and run my application without any problems whatsoever...on my development machine.
I originally was having the compile problems "The type NationalInstruments.ISupportSynchronizationContext is a defined assembly that is not referenced..." but when I switched my target framework from ".NET Framework 4 Client Profile" to simply ".NET Framework 4", I got rid of all my compile issues. Like I said, everything is running fine...on my development machine.
I now have compiled a release version of my application and, again, on my development machine, it runs fine. BUT...
I copy the release .exe along with the NI .dlls, (NationalInstruments.Common.dll, NationalInstruments.NI4882.dll and NationalInstruments.MeasurementStudio.dll) that I think I need to a "clean" machine and try to run it, I get the "Could not load file or assembly 'NationalInstruments.Common Version = 9.0.40.362, Culture = neutral" etc.
My application is compiled against NationalInstruments.Common version=9.1.40.159 and that is the version of the dll that I copied to the "clean" machine. So, if I compiled against version 9.1.40.159 and I have a copy of 9.1.40.159 on the clean machine, why in the world is my application looking for an older version?!
Any thoughts would be greatly appreciated.
Thanks
03-06-2014 05:46 PM
Hey there,
Instead of just coping and pasting the project over, you can create an installer to deploy the project and make sure the correct dependents are included. To create a deployment you can follow this helpful guide.
http://digital.ni.com/public.nsf/allkb/ED87C183E056CAC386256DF1004E54C6
I hope this helps
Connor