我怎么可以嵌入应用程序清单到使用VS2008的应用程序? [英] How can I embed an application manifest into an application using VS2008?

查看:372
本文介绍了我怎么可以嵌入应用程序清单到使用VS2008的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里和的here 的方式嵌入我的应用程序的的PE,但这些步骤里面清单文件似乎不工作VC#:VS2008 - VS2008甚至没有配备mt.exe(据我所知)

I've read here and here for ways to embed my application's manifest files inside the PE but these steps do not seem to work for VC#:VS2008 - VS2008 doesn't even come with mt.exe (as far as i know)

我怎么会去这样做?

推荐答案

您可以添加一个清单给你的C#应用​​程序通过以下步骤:

  1. 在解决方案资源管理器右键单击项目
  2. 选择从上下文菜单中选择添加新项。
  3. 从在出现的对话框中的选项列表中选择应用程序清单文件。

不过,请注意,Visual Studio中已经增加了一个清单给你的项目在默认情况下,以确保符合UAC存在于Windows Vista和7 如果您要指定一个自定义的清单文件应使用由您项目代替,请按照下列附加步骤:

However, note that Visual Studio already adds a manifest to your project by default in order to ensure compliance with UAC found in Windows Vista and 7. If you want to specify that a custom manifest file should be used by your project instead, follow these additional steps:

  1. 一旦你添加自定义清单文件到您的项目,在解决方案资源管理器右键单击项目,然后单击属性(或您的项目在属性项双击)。
  2. 在第一个选项卡(应用程序),你应该会看到一组选项中指定应用程序如何管理资源。您可以保留默认的图标清单选项选中,但你需要选择从下拉框中标有清单自定义清单文件。

最后,为了完整起见,或者如果上述步骤你不工作,你仍然可以使用的 mt.exe 以嵌入您的清单文件到您的应用程序的EXE你已经建立之后。如果它不包含安装的Visual Studio,你需要下载并安装Windows SDK。获取最新版本的Windows 7和.NET Framework 4.0 <一href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en">here.

Finally, for the sake of completeness or if the above steps don't work for you, you can still use mt.exe to embed your manifest file into your application's EXE after you've built it. If it wasn't included with your installation of Visual Studio, you'll need to download and install the Windows SDK. Get the latest version for Windows 7 and the .NET Framework 4.0 here.

这篇关于我怎么可以嵌入应用程序清单到使用VS2008的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆