12-15-2009 11:34 AM
Walter,
You need to click on the compile button (below application) then click on the advanced compile options.
Here you can set the tyarget framework and also set the Traget cpu to AnyCpu, x86 or x64.
Regards
steve
12-15-2009 11:51 AM
its in a different location in VB.
12-15-2009 01:48 PM
Thanks Snowman. I found it and changed the target to 3.5. It still throws the warnings:
Warning 1 Referenced assembly 'C:\Program Files\National Instruments\
MeasurementStudioVS2008\DotNET\Assemblies\Current\
NationalInstruments.Common.Native.dll' targets a different processor than
the application. Load Deflection Tester
same warnings (2 through 5) with:
NationalInstruments.DAQmx.dll
NationalInstruments.UI.Styles3D.dll
NationalInstruments.UI.WindowsForms.dll
NationalInstruments.UI.dll
If I click on any of these it shows 2008 version. Apparently I am no closer than I was a couple days ago.
12-16-2009 09:36 AM
The warning you show below is about the Target Processor, not the Target Framework. I suspect that the Target CPU of your project is either x64 or Any CPU. Change it to x86 to resolve these warnings. You can see the Target CPU setting in the screenshot that Richard posted.
Versions of Measurement Studio prior to Measurement Studio 2009 (which just started shipping on December 4th) can be used only in 32-bit applications. Measurement Studio 2009 includes assemblies that can be used in 64-bit applications.
David Rohacek
National Instruments
12-16-2009 10:17 AM
07-08-2011 01:19 PM
Hi David,
I am having a similar problem. Using C# 2010 Express, I'm not sure how to change the target platform. I've tried adding:
<PlatformTarget>x86</PlatformTarget>
in the project file of the XML editor, but I still have the "targets a different processor" warning comming up for both NationalInstruments.Common.Native.dll and NationalInstruments.DAQmx.dll.
The two errors I'm experiencing are
"NationalInstruments.ISupportSynchornizationContext" is defined in an assembly that is not referenced. You must add a reference to assembly "NationalInstruments.Coommon, Version9.040.610" and something similar for NationalInstruments.IsyntchronizeCallbacks".
I have tried referencing the .dll's from the Assemblies(64-bit) in the 9.0.40.610 directory and have also copied and pasted the files into the same directory as my code. I've tried a similar approach with the files from the 9.3.40.219 and Current directories.
I'm still not sure what is wrong.
Any suggestions? Any help is greatly appreciated.
Thanks
07-11-2011 08:53 PM
Hi Seth,
Could you post the section of code that mentions the "NationalInstruments.ISupportSynchornizationContext" as well as the reference you made to "NationalInstruments.Coommon, Version9.040.610". It would be helpful to see this.
Thanks!
Jackie
07-12-2011 08:38 AM
Hi Jackie,
Since I'm only doing a test code right now, here's the entire code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NationalInstruments;
using NationalInstruments.DAQmx;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void WriteData_Click(object sender, EventArgs e)
{
Task writeAO0Task = new Task();
}
}
}
At the moment, I'm just rying to set up a simple program that will compile and run that I could then build on.
The references added in the solution explorer are NationalInstruments.Common.Native and NationalInstruments.DAQmx.
Thanks,
Seth
07-14-2011 09:44 PM
Hi Seth,
I would try adding a reference to NationalInstruments.Common. Add "using NationalInstruments.Common" To your code. Let me know how this turns out!
Regards,
Jackie
07-15-2011 08:26 AM
Hi Jackie,
Adding:
NationalInstruemnts.Common;
to the set of using statements gives me the error:
The type or namepscae name 'Common' does not exist in the namespace 'NationalInstruments' (are you missing an assembly reference?)
NationalInstruments.Common.Native is in the Solution Explorer. Double clicking on it shows it in the Object Browser with the other References.
While typing the statement, it appears that I only have access to NationalInstruments.Restricted, or NationalInstruments.DAQmx. So I'm not sure how tot perperly add the reference.
Thanks,
Nitin