gpt4 book ai didi

c# - OSIsoft AF SDK 缺少程序集或引用,还添加了引用

转载 作者:行者123 更新时间:2023-12-02 03:30:55 25 4
gpt4 key购买 nike

我正在使用 OSIsoft AF SDK 版本 4。

添加引用后,一切工作正常,Visual Studio 可以看到 OSISoft 命名空间和所有内容。但是当我尝试构建时,我在输出窗口中收到此错误并且构建失败。

找不到类型或命名空间名称“OSISoft”(是否缺少 using 指令或程序集引用?)

有什么解决办法吗?

我删除并阅读了引用文献。打开并关闭VS并检查.Net框架版本(实际上我尝试了所有可用版本)。但是,构建仍然失败并且相同的错误仍然存​​在。

最佳答案

添加 AF SDK 引用时,您应该使用位于 GAC 程序集中的 4.0.0.0 版本,而不是直接从文件资源管理器中选择它!这意味着您的 AF SDK 安装已通过 PI AF 客户端安装工具包正确完成。

  • 2.0.0.0 Assembly 针对 .net Framework 3.5,是 AF SDK 的旧版/过时版本
  • 4.0.0.0 Assembly 针对最新版本的 .Net 框架。

enter image description here更多信息请参见 PI AF SDK 文档:PI AF SDK Documentation

Deployment of your compiled code: The target client computer for your code must have PI AF Client installed (AF SDK is the only item necessary). Then you just need to copy the compiled executable (and your .dll if any) of your .NET application (do not use a copy of AFSDK.dll from the developement machine.). Then the .dlls from the GAC will be used on the client and everything will work as expected.

关于c# - OSIsoft AF SDK 缺少程序集或引用,还添加了引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51879245/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com