Visual Studio 2010:如何使用默认设置嵌入清单
在 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:
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":
How to a convince Visual Studio 2010 to include a manifest that includes a dependancy on version 6 of the common controls library?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.
创建您自己的清单文件。如果您希望代码以管理员身份运行

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