Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to reference NationalInstruments.DAQmx in my C# application but getting build error

Solved!
Go to solution

I am trying to reference NationalInstruments.DAQmx.dll in my C# application but getting following build error. Any idea how to fix this issue?

 

Warning 1 The referenced assembly "NationalInstruments.DAQmx, Version=9.4.40.50, Culture=neutral, PublicKeyToken=dc6ad606294fc298, processorArchitecture=x86" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. NITesting

0 Kudos
Message 1 of 5
(4,680 Views)

Found the issue myself. Thanks!

0 Kudos
Message 2 of 5
(4,677 Views)

Hi,

I have the same problem.

Can you give me the solution please.

Thank you.


Julien GELAY
Tecsup
Technicien BE - Software
0 Kudos
Message 3 of 5
(4,639 Views)
Solution
Accepted by vsanghvi

Julien,

 

If you have the exact same error message as posted above, it looks like the problem was that the project was configured for the .NET 4.0 Client Profile. The .NET 4.0 Client Profile is a lightweight version of the .NET framework, but National Instruments assemblies require the full .NET 4.0 framework. You can configure your project (even after it is created) to use the full .NET version in Project Properties>>Application>>Target framework in C# and Project Properties>>Compile>>Advanced Compile Options...>>Target framework in VB .NET.

 

If this is not the same error message you are receiving, or if this does not resolve the issue, could you please post the error message in your response?

National Instruments
Message 4 of 5
(4,628 Views)

Thanks, helped me kick-start building my application.

0 Kudos
Message 5 of 5
(4,372 Views)