Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

VS2005 Could not load file or assembly 'NationalInstruments.Common'

Hello,

 

I am experiencing problem with using NiDaq Driver 9.1.7 (installation version)

 

I have an VB.Net 2005 application which refers dlls:

 

NationalInstruments.Common 8.9.20.302

NationalInstruments.DAQmx 9.1.20.15

 

The application is compiled as x86

 

The system is Windows 7 64-bit

 

error.jpg

 

references.jpg

compilesettings.jpg

 

 

Thanks in advance for your efforts

0 Kudos
Message 1 of 7
(5,530 Views)

This error occurs because NationalInstruments.DAQmx 9.1.20.15 assembly requires a higher version of NationalInstruments.Common than 8.9.20.302. When you installed the DAQmx .NET API, it should have installed the dependent version of NationalInstruments.Common. In this case, the error is saying it needs version 9.0.20.610. Add this version to your reference instead and the error should go away. Updating Common should not affect the functionality of your application.

National Instruments
0 Kudos
Message 2 of 7
(5,525 Views)

This software was installed directly from a National Instruments that came with the hardware. Very strange it is not compatible. I will try to update using an update tool.

0 Kudos
Message 3 of 7
(5,520 Views)

It may not be that it is installed incorrectly, it may be that you have multiple copies on your system. In fact on my system, I have a couple dozen copies from various NI software I have installed. If you have Measurement Studio installed, then there is an option in the Measurement Studio menu in Visual Studio that will automatically update this reference for you.

National Instruments
0 Kudos
Message 4 of 7
(5,511 Views)

I removed the NI-software before, i checked every folder on NI-files-presence. Rebooted and ran a registry tool, this did not work.

 

I even installed the NI-software on a laptop were never any NI-tools were installed, the same problem exists there.

 

 

Brecht

0 Kudos
Message 5 of 7
(5,490 Views)

I just confirmed that we do ship the 8.9.20.302 version of NationalInstruments.Common.dll with DAQmx 9.1.7, but this is also the version that NationalInstruments.DAQmx.dll version 9.1.20.15 is built against. So you have the right versions on your system, but for some reason your project is confused about which it should be using. Did you copy this project from another system that has a later version of NationalInstruments.Common installed? If so, you may have inadvertantly created a app.config file (these can be autogenerated by Measurement Studio when you attempt to resolve a warning). See if your project has this file and if so, is it redirecting your project to use the 9.0.20.610 version of Common.

National Instruments
0 Kudos
Message 6 of 7
(5,482 Views)

Hello,

 

This is my App.Config. 'HiddenIdentifier' is the projectname i would like to hide. But there is no reference to any National Instruments library.

 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="HiddenIdentifier.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <system.diagnostics>
        <sources>
            <!-- This section defines the logging configuration for My.Application.Log -->
            <source name="DefaultSource" switchName="DefaultSwitch">
                <listeners>
                    <add name="FileLog"/>
                    <!-- Uncomment the below section to write to the Application Event Log -->
                    <!--<add name="EventLog"/>-->
                </listeners>
            </source>
        </sources>
        <switches>
            <add name="DefaultSwitch" value="Information" />
        </switches>
        <sharedListeners>
            <add name="FileLog"
                 type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
                 initializeData="FileLogWriter"/>
            <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
            <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
        </sharedListeners>
    </system.diagnostics>
    <userSettings>
        <HiddenIdentifier.My.MySettings>
            <setting name="AAA" serializeAs="String">
                <value>RadioButton2</value>
            </setting>
        </HiddenIdentifier.My.MySettings>
    </userSettings>
</configuration>

 

I found this in ProjectName.vbproj

 

<-- a lot of xml, not relative to national instruments -->

 

<ItemGroup>
    <Reference Include="Microsoft.VisualBasic.Compatibility" />
    <Reference Include="NationalInstruments.Common, Version=8.9.20.302, Culture=neutral, PublicKeyToken=4544464cdeaab541, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.DAQmx, Version=9.1.20.15, Culture=neutral, PublicKeyToken=4544464cdeaab541, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
      <Private>True</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>

 

<-- a lot of xml, not relative to national instruments -->

 

 

Thank you very much for all your efforts already

 

Brecht

0 Kudos
Message 7 of 7
(5,476 Views)