使用搜索功能查看 Kepware 的信息库,其中包含 500 多篇知识库文章。缩小搜索结果范围,或在下面的搜索字段中输入您的查询。

或者,如果您无法找到解决方案,我们还有另一个资源:我们的 PTC eSupport Portal。 如果系统提示您登录 eSupport Portal,您可以使用“我的 Kepware”凭据。需要一个“我的 Kepware”帐户吗?在此处创建

搜索解决方案结果:
View All Solutions

Kepware Knowledge Base: Solution


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


Last Update: 2018/11/7

Problem:
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=3.5.0.3, 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.

Solution:
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.

Note:
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
ClientAce