09-11-2012 12:03 PM
Hi everyone,
I have programmed an windows form application with VS 2010 C# and I am using the .Net Framework 4. I am using the references NationalInstruments.Common version 9.1.40.159 and NationalInstruments.VisaNS version 9.0.40.156.
For deployment, I have created a setup project using the primary output of the other project (of this solution) as source. I have changed the prerequisits to the ".Net Framework 4" (not the client version).
I find the following three dependencies which relate to the NI VISA drivers:
mstudiocommon.2010.msm version 9.1.0.159
mstudioutils.msm version 9.1.159
mstudiovisa.2010.msm version 9.0.0.156
My software returns for the deployed application an exception when I am issuing the following command:
resources = ResourceManager.GetLocalManager().FindResources("GPIB?*");
and the exception is:
"Insufficient location information or the device or resource is not present in the system. VISA error code - 1073807343 (0xBFFF0011), ErrorResourceNotFound"
I should mention, it works perfectly on the computer I have programmed the application with.
Thanks,
Ben
Solved! Go to Solution.
09-11-2012 04:35 PM
Hello everyone again,
maybe this is helping a little bit. I found that a warning is returned when I am building the installer:
WARNING: Unable to find dependency 'NATIONALINSTRUMENTS.COMMON.NATIVE' (Signature='DC6AD606294FC298' Version='9.0.40.362') of assembly 'NationalInstruments.Common.dll'
Does anyone have an idea?
Ben
09-11-2012 07:41 PM
Hello everyone again,
I have gotten the information that the users who have not installed any NI stuff when installing my software get the following error:
"The VISA driver library cannot be found. Either VISA is not installed or VISA is improperly installed."
I have re-created the Setup program which got rid of the warning. However, the software does not work.
Any ideas?
Thanks in advance,
Ben
09-12-2012 11:42 AM
Hi Ben,
Although you are including the VisaNS mere module in your distribution, the VISA driver itself is not actually being distributed. You will need to install the actual driver itself on the target system. Unfortunately, the Microsoft Setup Projects do not provide a simple way to package the driver itself into a distribution. You can try to package the driver installer with your installer and run the setup.exe for the VISA driver as a post install step.
For your first post however, it looks like the driver may actually be installed (I am not sure of this, so make sure to check that it is actually installed). You will receive this exception if the search fails to find any instruments matching the expression you passed it. Are you sure that a device name starting with "GPIB" is installed on the system? Could you post a MAX Technical Report?
09-12-2012 12:15 PM
Hello D_Biel,
thank you again for your quick reply. I have several follow-up questions:
- Do my users have to install Ni MAX and NI 488.2?
- Do you think, there is an easier possibility to install the driver with an Install Shield Setup Project?
As for my first topic, it seems that the GPIB to USB converter was crashed. I tried it later again and it worked. (On that machine we have installed all the drivers). Shall I still send in a report?
Thanks,
Ben
09-12-2012 01:28 PM
Oh yes, you will also need 488.2 (didn't pay attention to this being a GPIB device). I don't think MAX is a requirement, but can make it easier to configure your target systems.
It might be easier to use InstallShield. I have not used it much myself, but I know that many of our customers are using it and are successful with it. I just installed the Limited Edition and found a way to add the driver installer as a custom action. Basically, you point to the location of the setup.exe for the driver and tell it to run. The same can be done using the Visual Studio Setup Project, but InstallShield provides a bit more flexibility and control. I found an article on the InstallShield method on Microsoft's website: http://support.microsoft.com/kb/316907
09-12-2012 01:29 PM
You can also simplify the process for your end user by automating the driver installers: http://digital.ni.com/public.nsf/allkb/878FC4C374013ADF8625733D00688F67?OpenDocument