c# - 找不到文件“Microsoft.Windows.Common-Controls,版本=6.0.0.0,文化=*,PublicKeyToken=6595b64144ccf1df,

标签 c# wpf manifest common-controls

我正在尝试整合 this library进入我的应用程序。

起初它崩溃了

Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'.

所以我取消了评论

<dependentAssembly>
  <assemblyIdentity
      type="win32"
      name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0"
      processorArchitecture="*"
      publicKeyToken="6595b64144ccf1df"
      language="*"
    />
</dependentAssembly>

如推荐的那样here .

现在应用程序不会编译并显示以下消息:

Could not find file 'Microsoft.Windows.Common-Controls, Version=6.0.0.0, Culture=*, 
    PublicKeyToken=6595b64144ccf1df, ProcessorArchitecture=*, Type=win32'

删除 app.manifest 会导致应用程序崩溃,因为我使用的是 Microsoft Ribbon。

如何修复此错误?

最佳答案

您正在尝试的文件在 Windows 7 上不受支持。这意味着您必须提供它,如果您尝试开发可在 Windows XP 上运行的应用程序,最简单的解决方案是放弃对 Windows XP 的支持。

Mainstream Support for Microsoft Visual Basic 6.0 ended on March 31, 2005. However, we are releasing this non-security related package because it contains improvements that were ready for release just prior to the end of Mainstream Support. Microsoft Visual Basic 6.0 has transitioned to Extended Support which runs through March 31, 2008. Microsoft is not extending the Mainstream Support phase for Microsoft Visual Basic 6.0 in any way.

来源: Microsoft Visual Basic 6.0 Common Controls

Supported operating systems: Windows 2000, Windows 2000 Advanced Server, Windows 2000 Professional Edition , Windows 2000 Server, Windows 98, Windows 98 Second Edition, Windows ME, Windows NT, Windows Server 2003, Windows XP, Windows XP Home Edition , Windows XP Media Center Edition, Windows XP Professional Edition, Windows XP Tablet PC Edition

在您停止使用此文件之前,它不能作为 64 位进程在任何 Windows 操作系统(包括 64 位 Windows XP 版本)上运行。

没有理由不修改要用于受支持文件的代码的行为。

您可能会在这个项目上有更好的运气:http://www.codeproject.com/Articles/137552/WPF-TaskDialog-Wrapper-and-Emulator

关于c# - 找不到文件“Microsoft.Windows.Common-Controls,版本=6.0.0.0,文化=*,PublicKeyToken=6595b64144ccf1df,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10330105/

相关文章:

data-binding - 查看不显示来自 Manifest.json 的模型数据

C# Array.Contains() 编译错误

android - 为什么即使应用程序处于后台,BroadcastReceiver 也能正常工作?

c# - 用于扩展集合对象的 OData 客户端 v3 到 v4 更新方法

c# - 在 wpf 中拖放路径

c# - WPF 和 Silverlight 命令实现对于 M-V-VM (M-V-P) 模式毫无用处吗?

c# - 在 WPF 应用程序中显示和筛选 XML 数据

manifest - JAR 文件 : digital signature

c# - 倾斜模型根据加速度统一

c# - 异步 WCF 调用来保存线程?