検索機能を使用して 500 を上回る Kepware の知識ベース記事の中から閲覧します。結果を絞り込むか、クエリーを下部の検索フィールドに入力します。

解決策が見つからなかった場合には、当社の PTC eSupport Portal で追加資料を確認することもできます。eSupport Portal へのログインを要求された場合、My Kepware の認証情報を使用できます。My 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/07

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