04-26-2010 10:58 PM
Hi All
I just download a trial version of MS2009 for Visual Studio 2008 and try to edit my library that developed priviously . I found a conflicting or an Ambiguity in NationalInstruments.Common DLL version . The one comes with MS2009 is ver 8.9.35.156 whereas in my reference DLL is in ver 8.1.20.237 both of them have the same runtime version.
These 2 version couldn't add to the reference at the same time . The problem is with a new version I got an error while declaring and object as statment bellow ( also see attached picture) :
Private m_PortTask As Task
Private m_Reader As DigitalSingleChannelReaderPrivate m_Writter As DigitalSingleChannelWriter
These 3 objects required the old version dll (8.1.20.237 ) but some where in my code it need a new version of this file for instant when I need an SwitchStyle enum as an argument of my method . This enum available in new version but not old version.
I think there should be some bugs here or some things were removed .
Please who know what happen keep me post.
Regards
Solved! Go to Solution.
04-27-2010 05:43 PM
Hello Khammonh,
What did you previously create this library with? Have you tried to remove the previous references and readding them and pointing them to the newer dll?
04-27-2010 10:29 PM
Hi ColeR
Thank to interest in my case .
Let me explain in more detail , my library was developed using Visual Studio 2008 Pro . Previously I used a DAQmx driver come with the board we bought 2-3 year ago and I develop a library base on this version.
Recently I download a trial version of Measurement Studio 2009 which also couple with DAQmx and associate NationalInstrument.Common dll which is a newer than the version I used before and I try to develop a new Library version that cover all NI hardware not just Data Acquisition hardware so I create an entirely new project base on Template in Measurement Studio Plug in . The reference assembly were added by this template there is no thing relate with my old library . I just copy and paste my old code into a new class library as old code refer to the same set of NI assembly . The problem is old NI library and their new one doesn't compatible especially NationalInstrument.Common.dll so I got an error as described previously. The Key is DLL version is not backward compatible with the old set of the same Assembly I think DAQmx refer internally to NationalInstrument.Common.dll and in the new version their didn't implement an IAsyncResult interface in the class or some sort It seem to me it is a bug in a new Assembly.
Regards.
04-29-2010 08:08 PM
Hello Khammonh,
I think that you are running into the issue as described by drohacek in this thread, and Al B in this thread. Essentially, MS2009 for VS2008 assemblies target the .NET 3.5 framework, whereas the older DAQmx assemblies target the .NET 2.0 framework. The best way to solve this is to update your DAQmx references to target DAQmx 3.5 assemblies. You may need to re-run or upgrade the DAQ driver for this.
NickB
National Instruments
05-04-2010 08:31 PM
Hi NickB
Thank for your recommendation.
I just come back to my post and saw your answer. Last week I did tried to download a new version of DAQmx ver. 9 and install it on my system . Then all issues I have here has been solved thus mean this version has solved the mentioned problem.
Regards