Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to distribute VISA components

I am working on an application which interfaces to different external equipment. I now have the task of integrating a device from Rigol which uses the NI-VISA. This is new to me - never heard of it before yesterday.

 

I have installed 'visa540_full.exe' and found the NationInstruments.Common & Visa dlls and was able to communicate with the Rigol equipment on my development PC.

 

I tried to deploy the application to a send PC after installing the NIVISARuntime but I'm getting the following error.

 

Could not load file or assembly 'NationalInstruments.Common,
Version=13.0.40.188, Culture=neutral, PublicKeyToken=dc6ad606294fc298' or one of
its dependencies. The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040)

 

I think I saw that the Version on my PC is 13.0.40.190 which I guess has something to do with the problem.

 

What is the proper way to proceed here? Are there different runtime versions? (could only find the one) Can I pack everything I need into my application? If so what do I need? Is there a list of dlls?

 

Thanks!

Paul

0 Kudos
Message 1 of 7
(6,857 Views)

Hi Paul,

 

first of all maybe the following Threads can give you some help to fix the problem

 

http://forums.ni.com/t5/Measurement-Studio-for-NET/VS2005-Could-not-load-file-or-assembly-NationalIn...

 

http://forums.ni.com/t5/Measurement-Studio-for-NET/Could-not-load-file-or-assembly-NationalInstrumen...

 

The next thing is can you give some information about your systems, you build and the system there you deploy your application.

Do you try to deploy the application on another pc?

 

Best Regards

Dominik

0 Kudos
Message 2 of 7
(6,838 Views)

Further information:

 

  • All systems are Windows 7
  • Development VS2010, 32bit PC
  • Target platform x86
  • Deployment 32 & 64bit

On one deployment PC (64bit) I deinstalled all NI components and reinstalled. This worked. I'm now looking at a 32bit PC with the same problem but reinstalling everything hasn't worked yet.

 

Paul

 

0 Kudos
Message 3 of 7
(6,827 Views)

Can you see the needed common under Detected Dependencies in VS?

 

Dominik

0 Kudos
Message 4 of 7
(6,817 Views)

Not sure what you mean by DetectedDependencies. (I have to use a German edition so all the names are different)

 

What I do have are the project references. I added NationalInstruments.Common in order to access the API.

 

I managed to get the 2nd PC working today. The default options from 'full540.exe' were installed yesterday and on a whim I decided to install the .Net4.0 option as well. Then it worked. I had expected that part to be installed via my application. Obvously something missing. But what ....?

 

 

Paul

0 Kudos
Message 5 of 7
(6,815 Views)

I think to build and installer with all the needed parts for the application is the best way not to forget something importend. 

The DetectedDependencies folder is in the Solution Explorer.

 

After you install with .Net 4.0 option, your application running on both systems?

 

 

Message 6 of 7
(6,812 Views)

Ok - I figured out what you mean. It's the Detected Dependencies folder (Gefundene Abhängigkeiten) in a standard Setup project. I have been (trying) to use a WiX setup project because it seemed to integrate better with out CI build server which we use for our Java projects. I don't think that WiX automatically detects dependencies so I have had to enter them by hand. Perhaps it's time to go back to the old setup...

 

Thanks for the tip!

 

(My app is now running on both systems where it has been deployed)

0 Kudos
Message 7 of 7
(6,808 Views)