Visual Studio 2010:如何使用默认设置嵌入清单

发布于 2024-12-27 01:40:33 字数 886 浏览 3 评论 0原文

在 Visual Studio 2010 中,我希望它使用默认设置嵌入清单:

在此处输入图像描述

不幸的是,嵌入的清单没有包含对公共控件库版本 6 的依赖:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

这意味着我的 WinForms 应用程序“不使用 XP 主题”:

在此处输入图像描述

如何说服 Visual Studio 2010 包含包含对公共控件库版本 6 的依赖项的清单?

In Visual Studio 2010, i want it to embed a manifest with default settings:

enter image description here

Unfortunately the embedded manifest does not include a dependency on version 6 of the common controls library:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

This means that my WinForms application "doesn't use XP themes":

enter image description here

How to a convince Visual Studio 2010 to include a manifest that includes a dependancy on version 6 of the common controls library?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

星星的轨迹 2025-01-03 01:40:33

Cody 找到了 Visual Studio 中多年未解决的问题的答案,这帮助我解决了我的问题。

Hans 指出,您不需要声明对 Common Controls Version 6 的依赖关系即可获取版本 6 库,这也帮助我解决了问题。

所以他们都应该得到信任。

Cody had the answer to a question that has gone unresolved in Visual Studio for years, which helped me solve my problem.

Hans noted that you're not required to declare a dependancy on Common Controls Version 6 in order to get the version 6 library, which also helped me solve my problem.

So they should both get credit.

时间海 2025-01-03 01:40:33

创建您自己的清单文件。如果您希望代码以管理员身份运行 level="requireAdministrator",请在记事本中保存为 app.manifest 与上面提到的相同代码,级别为管理员。
然后将其导入到您的项目中,添加新项目 ->选择文件。
稍后转到应用程序属性并将默认清单更改为您创建的清单文件
输入图片此处描述

create your own manifest file. in notepad and save as app.manifest same code mentioned above with with level as administrator if you want code to run as admin level="requireAdministrator".
then import it to your project , add new item -> select the file.
later go to application properties and change the default manifest to the manifest file you created
enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文