When compiling LabVIEW VIs with the WATS Client LabVIEW toolkit, LabVIEW does not automatically include all of WATS' dll dependencies.
It will automatically include Virinco.WATS.ClientAPI.dll since it is used directly by the toolkit, but will not include Newtonsoft.Json.dll because this is only used by Virinco.WATS.ClientAPI and not by LabVIEW, so it doesn't detect it.
This will appear to work during development and when testing on the development machine because Newtonsoft.Json.dll has been installed to the correct location by the WATS Client.
When the compiled exe is deployed to production, it will fail with error "Could not load file or assembly 'Newtonsoft.Json, Version={version}, Culture=neutral, PublicKeyToken={token}' or one of its dependencies", because Newtonsoft.Json.dll is not part of the build output and was not deployed alongside Virinco.WATS.ClientAPI.dll.
Make sure to include the files into your build project.
Comments
0 comments
Article is closed for comments.