|
|||||||||||||
03-21-2012 04:33 AM
Hello,
After upgrading the NI .NET software to version 9.x, the NIScope .NET implementation is broken. NationalInstruments.ModularInstruments.Scope expects version 8.9.x of NationalInstruments.Common to be present. After an upgrade to 9.x, the 8.9 files are removed, and one can anyway only reference a single version of NationalInstruments.Common per project.
- NI, are there plans to upgrade the DotNETClassLibraryForScope111 (http://digital.ni.com/public.nsf/allkb/D139037C4D9
- Is there a workaround for the lack of NIScope support using the 9.x version of the .NET libraries? Curretly it seems the only solution is a downgrade of the whole installation.
Best regards,
Maarten van Kampen
Solved! Go to Solution.
03-28-2012 10:48 PM
I have an instrument driver written in Visual Studio 2010, based on the .NET 4.0 framework that needs to utilise the NI Scope .NET libraires. However, the latest version 1.1.1 only supports Visual Studio 2008. Therefore it looks like I may need to downgrade in order to use the NI Scope functionality. All of my other drivers are all written in VS 2010 so it would be a shame if this was the odd one out?
Are there any plans to release support for Visual Studio 2010 in the near future? Alternatively, has anyone tried downgrading in order to implement this functionality, then subsequently re-upgrading the application again?
Regards,
David
03-29-2012 11:21 AM
NI-Scope support for .NET 4.0 is on our roadmap, but I cannot comment on when that may be available.
There should not be an incompatibility with NationalInstruments.Common. Common is backwards compatible and so you can reference a higher version of Common in your project that what the driver uses. When you make this reference, you will receive a warning, but double-clicking the warning in Visual Studio will give you the option to automatically create an app.config file which will redirect the dependency.
03-30-2012 01:25 AM
Hello D Biel,
NI Scope did work in Visual Studio 2010 using the older .NET 3.5 framework. After upgrading to the latest drivers (9.x family), this .NET 3.5 support is broken (apparently beyond repair); compiling the code, I get the error "Error 1 The type 'NationalInstruments.ISupportSynchronizationContex
Meanwhile I found another thread, http://forums.ni.com/t5/Measurement-Studio-for-NET
I am very unhappy about this. I can no longer use perfectly good hardware with my dedicated software because of extreme lags in NI driver support.
Is there a workaround? How difficult can it be to recompile the .NET driver with a reference to the 9.x framework?
Best regards,
Maarten van Kampen
void OpenScope()
{
// Open new connection
ScopeSession scope = new ScopeSession("yourdevice");
// Open
scope.Open();
// Create reader and waveform
ScopeSingleRecordReader reader = new ScopeSingleRecordReader(scope);
reader.MemoryOptimizedFetchFromMultipleChannelsCom
}
// Callback, fails to compile
void reader_MemoryOptimizedFetchFromMultipleChannelsCom
{
throw new NotImplementedException();
}
03-30-2012 09:35 AM
Hi Maarten,
I still think it may be a problem of referencing the wrong version of the assembly. This upgrade does not always happen automatically in the Visual Studio project. Could you post the version of each of the NI assemblies you reference in your Visual Studio project? Also, since you are using Visual Studio 2010, make sure that the Target Framework for your project (found in Project Properties) is set to 3.5, and not the default 4.0 Client Profile.
04-02-2012 04:46 AM
Hello D Biel,
It seems the issue was indeed not the upgrade, but the target framework. Checking the target framework settings, I found it to be on '.NET 3.5 client' profile. The 'ISupportSynchronizationContext' error disappeared when selecting a full framework, be it either 3.5 or 4.0. Sorry for the confusion.
Thanks for the support,
Maarten van Kampen
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page