12-15-2009 06:59 PM
I hate to post twice on the same subject but I finally have my own Windows 7 (pro) dev machine, and I am trying to convert my projects from 8.5 to 8.6. However, I cannot even get a new project in MS 8.6.1 to work.
Here is my process:
I started out with a brand new computer with a fresh install of Windows 7 Pro and VS 2008 with SP1.
Then, I proceeded to install Measurement Studio 8.6.1 from the dvd, and the installation completed successfully.
After the reboot, I opened VS 2008 and created a new C# project. Then, I dragged a gauge from the toolbox over to the form, and let it populate.
When I check the references added to my project, they are as follows:
When I build and start the project, I get the following error:
"Could not load file or assembly 'NationalInstruments.UI.WindowsForms, Version=8.6.35.465, Culture=neutral, PublicKeyToken=18cbae0f9955702a' or one of its dependencies. An attempt was made to load a program with an incorrect format."
I have double checked, and the "copy local" option on all three NI libraries is set to "true." In addition, the file NationalInstruments.UI.WindowsForms exists in my debug directory after each build, and the version IS 8.6.35.465.
I don't understand what I could possibly be doing wrong. I have used MS for 3 years now, without any of these problems.
Any solution would be greatly appreciated...thanks!
12-15-2009 10:08 PM
Ok...I just figured it out. To fix the BadImageFormatException, you need to specify compiling for an x86 platform (I had "AnyCpu" selected).
Now everything is working just fine.