找不到文件'Microsoft.Windows.Common-Controls,Version = 6.0.0.0,Culture =*,PublicKeyToken = 6595b64144ccf1df,

Ars*_*ray 7 c# wpf manifest common-controls

我正在尝试将此库集成到我的应用程序中.

起初它崩溃了

Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'.
Run Code Online (Sandbox Code Playgroud)

所以我没有注释

<dependentAssembly>
  <assemblyIdentity
      type="win32"
      name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0"
      processorArchitecture="*"
      publicKeyToken="6595b64144ccf1df"
      language="*"
    />
</dependentAssembly>
Run Code Online (Sandbox Code Playgroud)

正如这里推荐的那样.

现在应用程序将无法使用以下消息进行编译:

Could not find file 'Microsoft.Windows.Common-Controls, Version=6.0.0.0, Culture=*, 
    PublicKeyToken=6595b64144ccf1df, ProcessorArchitecture=*, Type=win32'
Run Code Online (Sandbox Code Playgroud)

删除app.manifest会导致应用崩溃,因为我正在使用Microsoft功能区.

我该如何解决这个错误?

Sec*_*und 3

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

Microsoft Visual Basic 6.0 的主流支持已于 2005 年 3 月 31 日结束。但是,我们将发布此与安全无关的程序包,因为它包含在主流支持结束之前准备发布的改进。Microsoft Visual Basic 6.0 已过渡到扩展支持,该支持将持续到 2008 年 3 月 31 日。Microsoft 不会以任何方式扩展 Microsoft Visual Basic 6.0 的主流支持阶段。

来源: Microsoft Visual Basic 6.0 通用控件

支持的操作系统: 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中心版、Windows XP专业版、Windows XP平板电脑版

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

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

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