Article - CS333019

ClientAce Runtime Project Crashes with an Unhandled Exception When Running on a New PC

Modified: 02-Nov-2020   


Applies To

  • ClientAce 3.5.0.9 to 4.0.2.13

Description

Problem: A project is compiled and tested on the Visual Studio (VS) 2010 or 2012 Development PC targeting the .Net 4.0 Framework. When it is placed on another PC, it crashes with an unhandled exception error similar to the following: System.IO.FileNotFoundException: Could not load file or assembly 'Kepware.ClientAce.OpcClient.dll' or one of its dependencies. The specified module could not be found.  File name: 'Kepware.ClientAce.OpcClient.dll'  at Kepware.ClientAce.DA_Junction.ClientAceDA_Junction.DisconnectAllServers()  at Kepware.ClientAce.DA_Junction.ClientAceDA_Junction.Connector_Closing(Object sender, CancelEventArgs e)  at System.ComponentModel.CancelEventHandler.Invoke(Object sender, CancelEventArgs e)  at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)  at System.Windows.Forms.Form.WmClose(Message& m)  at System.Windows.Forms.Form.WndProc(Message& m)  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)  Possible Cause: The most likely cause is a Runtime dependency for the ClientAce libraries. The COM portion of ClientAce that does OPC DA is written in C++. In ClientAce version 4.0, this is C++ for VS 2010. The C++ code has the following file dependencies on the C++ redistributables for VS 2010: msvcr100.dll msvcp.dll Solution: Install the VS 2010 C++ redistributables. Note: Users can download the install from Microsoft at  http://www.microsoft.com/en-us/download/confirmation.aspx?id=5555 .
This is a printer-friendly version of Article 333019 and may be out of date. For the latest version click CS333019