Use the search and browse feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Search Solutions Results By: View All Solutions

Kepware Knowledge Base: Solution


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


Last Update: 11/12/2018

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.

Related Products
ClientAce