Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble distributing standand alone .NET application that uses NI488.2

Hi there,

I have written a .NET 2.0 application that references the following two .NET assemblies...

 

NationalInstruments.NI4882 - 8.6.20.412 - 4544464cdeaab541

NationalInstruments.Common - 8.6.20.131 - 4544464cdeaab541

 

These assemblies were installed via the "NI-488.2 for Windows, Version 2.7" Installer downloaded from the Web.

 

The application is designed to be used by only one person, hence I I asked them to install the same thing!

However they did start off by using the NI supplied CD to install the software...

 

The application falls over because of the following exception

 

System.IO.FileNotFoundException: Kan bestand of assembly NationalInstruments.NI4882, Version=8.6.20.412, Culture=neutral, PublicKeyToken=4544464cdeaab541 of een van de afhankelijkheden hiervan niet laden. Het systeem kan het opgegeven bestand niet vinden.
Bestandsnaam: NationalInstruments.NI4882, Version=8.6.20.412, Culture=neutral, PublicKeyToken=4544464cdeaab541

 

(ie assembly missing....)

When I asked them to look in the GAC to see what's installed they reported back, the following information

 

NationalInstruments.NI4882 - 8.6.35.412 - 18cbae0f9955702a

NationalInstruments.Common - 8.6.35.131 - 18cbae0f9955702a

 

Ie the version numbers are different as is the public key....

 

What should I do please?

Thanks for your help

David

0 Kudos
Message 1 of 4
(4,285 Views)

Hi David,

 

To resolve the problem that you are seeing you will need to make sure that the drivers are the same on the deployment machine as they are on the development machine.  I suggest visiting http://joule.ni.com/nidu/cds/fn/p/lang/en where you will find our drivers and updates so that you are able to set both systems up with the same drivers.

 

Regards,

 

Thomas Clark

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 4
(4,248 Views)

David,

 

You should be creating a setup application that bundles your application plus whatever assemblies you are using and have your end-user run this application plus the underlying driver CD. This will ensure that the assemblies you built against can be found on the target system. Check out the Deploying Measurement Studio help topic (i.e. you can find this help topic by opening up the NI-488.2 .NET Framework 2.0 Help) which will guide you through creating a setup application in Visual Studio (i.e. if you are using some other tool like Wise or Wix to build your installer, then let me know and I can guide you that online).

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 3 of 4
(4,242 Views)

Hi Jonathan N and ThomasC

Thanks for your comments,

Sorry I have been off on hols, hence my delay.

Anyway the problem is sorted, I asked the cutomer to do the following:-

 

1) Disconnect USB device
2) Uninstall NI products
3) remove NI assemblies from the GAC! (select assembly, right click with the mouse and select uninstall...)

4) re-install the NI 2.7 here is the options that I did:-

(pictures followed)

 

This still gave a 32 step install with a reboot!
 
Also I have got XP SP3, have you upgraded to SP3, the documentation says that this is what they have tested their code against!
 
 
So I assume now that he may have also upgraded to SP3, all I knew previously was that the PC had XP on it.He has now told me that his system is working correctly. (ie my app can communicate with your device)FYI I am using Wix2.0 it's brilliant and so simple to use, plus it's free.I had assumed that installing the CD would install the same drivers on both machines, but some how that did not happen and then things got out of sync.Perhaps the CD supplied had different versions.So In the end, we all downloaded your latest version 280MB of download to try to ensure that we had the same version installed. I would personnally wonder why you are putting your assemblies into the GAC, I would have been happy to install them (the .NET assemblies) for you and let your installers do the native stuff.Or alternatively give me a Merge module and I can link against that. However Microsoft seems to be going against this sort of solution and seems to prefer chaining MSIs...My current installation of your system has a link to the help file but claims that it's looking for dexplorer when clicked on, I cannot see from your installer how to solve this problem.:smileyvery-happy:Anyway the long and short is, the problem is solved. Thanks loads for your help and comments

 

 Best Regards

David

 

0 Kudos
Message 4 of 4
(4,211 Views)