Use the search 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.

Alternatively, if you are unable to find a solution, we have an additional resource - our PTC eSupport Portal . If you are prompted to log into the eSupport Portal, you can use your My Kepware credentials. Need a My Kepware account? Create one here .

Search Solution Results By:
View All Solutions

Kepware Knowledge Base: Solution

Errors Occur When Creating a ClientAce Version 3.5 Project in Visual Studio 2010

Last Update: 11/7/2018

Although example projects compile without errors, new projects fail and include the following Invalid Operation Exception: "An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assemble 'Kepware.ClientAce.OpcClient, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."

Possible Cause:
The ClientAce version 3.5 libraries are .NET 3.5 libraries. Visual Studio 2010 targets the .NET 4.0 environment by default.

To create ClientAce version 3.5 projects in Visual Studio 2010, users must either set the target .NET environment to .NET 3.5 or include support for the 3.5 Client Interface in a .NET 4.0 targeted project.

The examples provided below work correctly because they target the right .NET Framework.

Targeting .NET 3.5 In VB.NET

  1. To start, open the project's properties.
  2. Next, open the Compile tab. Then, click Advanced Compile Options.
  3. In Advanced Compile Settings, change the target Framework to .NET Framework 3.5.
  4. Once finished, click OK.

Targeting .NET 3.5 in C#

  1. To start, open the project's properties.
  2. Next, open the Application tab.Then, change the target Framework to .NET 3.5 Framework.
  3. Once finished, save, close, and re-open the project.

Targeting the .NET 4.0 Framework
For information on using ClientAce .NET 3.5 libraries in a .NET 4.0 targeted project, refer to Can ClientAce Be Used with Visual Studio and the .NET 4.0 Framework?

Developing on a 64-bit Operating System
For information on using ClientAce on a 64-bit operating system, refer to Can I Develop ClientAce Projects for 64 bit Operating Systems?

Related Products