11-14-2012 03:40 PM
A colleague of mine is using some .NET assemblies that I created to be used with our support code inside of his Labview VIs. When he runs them in compiled mode, everything works fine, but when he creates an executible to be ran on other stations that don't have a developers license, he must put them in the same directory as the executible. Is there a setting or procedure to change this so that they can remain in the directory that they were referenced to during creation of the VI?
11-15-2012 07:45 AM
One solution is to put your assemblies into the GAC of each station you want to use. I suggest to use an installer.
Hope it helps
Christian
11-15-2012 12:40 PM - edited 11-15-2012 12:41 PM
I'm not sure that LabVIEW controls the search paths per se but simply defers to the .Net runtime to locate the assemblies itself. Microsoft lists the standard process the runtime uses to locate assemblies here:
http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx
In your case the first step may help (creating a configuration file with the assemblies and locations detailed) if the assemblies will always be located in a known location on disk. The name of the config file will be based off the LabVIEW build executable name. As suggested the GAC may be the best place to store those assemblies particular if they are to be used by several applications globally but they must also be strong-named for security reasons.
Most LabVIEW builds that I do simply move the referenced assemblies into the Data sub-directory by default, removing the need to apply them globally (the dotNet runtime therefore finds them as part of it's search in the application directory, the fourth step mentioned in the link above). This works best of course if the assemblies will be only utilised by the one application to minimise duplicates and maintenance.
Hope this helps.