0

I am using LabVIEW 8.5, Testand 4.0 and Windows XP.

I have been using LabVIEW Vi's which call .Net dll( created in v2.0, not strongly typed, and not added in GAC) , and Testand sequences that call these Vi's successfully.

As the version of the dll changed,I drag and drop new dll into same location and all hell breaks loose. The already working Vi's break and if I add a new VI and point to the new dll, Constructor node complains "cannot load assembly".

I tried a workaround given at: http://digital.ni.com/public.nsf/allkb/3C5F47E9845C535286257C7100501990

I have tried following steps:

  1. Close LabVIEW and the project
  2. Delete the old dll
  3. Open LabVIEW, open the project, open any VI that tries to use old dll. it cannot find it, so I stop loading the VI
  4. close labVIEW, drag and drop new dll at same location( and some other dll's and exe that are used by this dll, but they stay the same)
  5. Open LabVIEW, open the project, create new VI, add Constructor node and point it to new DLL
  6. close the Vi without saving it, and open existing Vi's and point them to new dll
  7. save and close the project

The problem is, this workaround works sometimes, and does not work many times. Even, if I change step 4, and drag an drop new DLL and its dependencies to new location, (bring it back later) and repeating other steps, still does not solve the problem in deterministic manner.

I have tried upgrading to Lv2014, but problem still remains. Moreover, if anytime it works, I run the same VI from TS( and I upgraded to Ts 2014, which itself meant doing lot of process model changes and code change), it complains about one of the paths that dll resolves and fails. I go back to LaBVIEW, and now, it cannot load the dll again.

I have lost almost a month in this effort, so any help is appreciated. I cannot believe that NI does not have a permanent fix for this, or if there is, I don't know about it other than the one I cited above.

Either I am doing this incorrectly, or the DLLs need to build in VS 2010 in a particular manner or while running LabVIEW/TS .net services seed to be modified while copying new assembly, I don't know.

halfer
  • 19,824
  • 17
  • 99
  • 186
user915783
  • 689
  • 1
  • 9
  • 27
  • You have looked at [this](http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/net_specifying_assembly_version/) I assume. I am not sure about LV 8.5, but in newer versions you can specify the path of a DLL on the blockdiagram. Why don't you add the DLL to the GAC? – Ton Plomp Jan 07 '15 at 19:54
  • I am a user of this dll. The guy who built this does not want it to be added to GAC, as this is used by other applications, and adding it to GAC has caused problems for those applications. – user915783 Jan 07 '15 at 20:06

0 Answers0