Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ISupportSynchronizationContext missing after Measurement Studio 2010 installation

Hi,

 

I have recently updated my C# projects to use the .net4 framework and installed Measurement Studio 2010 (from 2008).

 

Prior to installing I uninstalled the previous version of Measurement Studio.

 

However, my project utilizing NI-Scope drivers, in particular the ModularInstruments class provided within the .netClassLibrary1.1.1, now no longer compiles.

 

The problem seems to be related to type ScopeSingleRecordReader, defined in namespace, "NationalInstruments.ModularInstruments.Scope".

 

The error is:

 

"

Error 581 The type 'NationalInstruments.ISupportSynchronizationContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'NationalInstruments.Common, Version=8.5.35.301, Culture=neutral, PublicKeyToken=18cbae0f9955702a'
"
I do not want to install an older version of Measurement studio to allow this reference to be added, is there a workaround for this issue, or is there an error in my setup?
Thanks in advance
Simon

 

0 Kudos
Message 1 of 12
(5,508 Views)

Hi Simon,

 

If you are using NI Scope hardware I would first like to suggest a reinstallation of NI-Scope driver. 

 

https://www.ni.com/en/support/downloads/drivers/download.ni-scope.html

 

If not then something more common like DAQmx should do the trick

 

https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html#

 

As you have already installed Measurement Studio 2010 one of these drivers should provide the support you need.

 

I would be interested to hear how you get on.

 

Happy Christmas

Kind Regards

Michael
NIUK Application Engineer
0 Kudos
Message 2 of 12
(5,489 Views)

Hi Micheal,

 

Thanks for the comment.

 

In the particular project I am only referencing the NI-Scope .net class library, version 1.1.1, has this been updated for VC2010? 

 

I suspect the old dll is being referenced within this driver?

 

I will re-perform the NI-Scope install and repost.

0 Kudos
Message 3 of 12
(5,480 Views)

To update, after reinstall of NI-Scope error is the same.

0 Kudos
Message 4 of 12
(5,477 Views)

Hi Simon,

 

First of all I'd like to wish you a Happy New Year!

 

In the solution explorer, under the References tree, are you able to see the relevant reference listed. If not, (like you said) this is probably why you are getting the error. You can fix this by going to Project>Add Reference.....>NET, and then scrolling down until you see National Instruments Common. Click OK and it should appear in the References. Try building again and see if you still get the error.

I hope this helps.

 

 

Kind Regards

Michael
NIUK Application Engineer
0 Kudos
Message 5 of 12
(5,408 Views)

Hi Micheal,

 

I dont have the appropriate reference installed any longer since I have upgraded to the latest measurement Studio, the older items have been uninstalled!

 

Regards

 

Simon

0 Kudos
Message 6 of 12
(5,396 Views)

Hey Simon -

 

Unfortunately, the NI-SCOPE .NET API does not support Visual Studio 2010.  I would like to talk with you regarding this support offline - do I have your permission to contact our forum administrator to get your information?

 

Thanks -

 

NickB

National Instruments

0 Kudos
Message 7 of 12
(5,357 Views)

Sure no problem.

0 Kudos
Message 8 of 12
(5,347 Views)

For the benefit of anyone else who sees this forum, I thought I'd mention a workaround to use the NI-SCOPE .NET API in Visual Studio 2010 that should hopefully get you by until a version of the NI-SCOPE .NET API is available that supports the .NET Framework 4.0.  Do the following to develop with Measurement Studio 2010 or later with the NI-SCOPE .NET API in Visual Studio 2010:

 

  1. Install Measurement Studio 2010 support for Visual Studio 2008
  2. Target all development done in Visual Studio 2010 for the NI-SCOPE .NET API to the .NET Framework 3.5.
  3. Make the Measurement Studio 2010 .NET Framework 3.5 components available in Visual Studio 2010.  Although the KB is specifically for Measurement Studio 2009, the same concepts apply for Measurement Studio 2010.

Once you have done these things, you should be able to develop NI-SCOPE .NET applications in Visual Studio 2010 with Measurement Studio 2010 or later.  The main drawback (besides not being able to use .NET Framework 4.0 features) is that you will not be able to use any of the integration features of Measurement Studio 2010 in Visual Studio 2010, such as the "Add/Remove .NET Class Libraries" menu item.

 

NickB

National Instruments

0 Kudos
Message 9 of 12
(5,321 Views)

Thanks for the comments, I will try the suggested solution asap.

 

Can you confirm when the .Net Scope API will be updated to provide this functionality without the workaround?

 

Are we talking weeks, months or never?

 

Simon

0 Kudos
Message 10 of 12
(5,316 Views)