|This Document is not yet Rated
Archived: How Can I Target the .NET 2.0 Framework from Measurement Studio 2009 for Visual Studio 2008?
This document has been archived and is no longer updated by National Instruments
Primary Software Version:
Primary Software Fixed Version:
I'm trying to build an application in Measurement Studio 2009 for Visual Studio 2008. I want to target and deploy to computers that have the .NET 2.0 Framework on them. What do I need to do to accomplish this?
First, you need to ensure that the following options are configured for the 2.0 Framework:
- In the Application tab of the Properties of your main project, set Target Framework to .NET Framework 2.0.
- In the Properties of your Setup Project, click the Prerequisites button to launch the Prerequisites dialog. In this dialog, disable .NET Framework 3.5 and enable .NET Framework 2.0.
- Double-click Microsoft .NET Framework under Detected Dependencies in your Setup Project to launch the properties window. Change the Version property to the 2.0 Framework.
Once the configuration is complete, you will also need to alter the references in your main project. It is important to note that Measurement Studio will overwrite the changes you make to the references if you add controls or update the references. Therefore, it is important to make the following changes each time before you build your executable:
- Take note of all the references in your Project that begin with
- Remove these references.
- Right-click on References and choose Add Reference.
- For each of the references you removed, select the 2.0 Framework version of it in this list. The 2.0 version of National Instruments Common is shown below. Note: The ".20" in the string "Version 220.127.116.11" is the indication that this is the 2.0 Framework version.
If you do not see the 2.0 Framework versions here, you will need to install Measurement Studio 2009 for Visual Studio 2005. You can do this by running the installer for Measurement Studio 2009. Note that you do not need to install Visual Studio integration if you do not have Visual Studio 2005 or if you do have Visual Studio 2005 but you do not want to develop Measurement Studio applications with it. The only reason for this installation is to get the 2.0 Framework versions of these assemblies.
After installing this, you should be able to add the references as specified in step 4 above.
The reason that this reference replacement is necessary can be traced back to a change in the .NET Framework. The 2.0 Framework did not have an assembly called
. However, this was added in a later version and the National Instruments assemblies built for 3.5 leverage this assembly. Therefore, when these are deployed on a target machine with only the 2.0 Framework, this assembly is missing and a crash occurs.
Product Manuals: Measurement Studio User Manual