visual studio 2008在windows 7 中调试程序可能会出现:
读取注册表的时候提示没有权限,这样不能调试程序。或者其他需要管理员权限的代码。
解决办法:
在运行的visual studio 2008解决方案中的启动程序添加“Application Manifest File”,名字为:app.manifest
然后
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
替换成
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
重新编译解决方案。按照提示重新启动visual studio 2008后出现提示对话框
“This task requires the application to have elevated premissions.”
点击 "restart ...."那个按钮重新启动即可成功调试程序。
本文介绍了解决Visual Studio 2008在Windows 7环境下调试程序时遇到的权限问题。通过修改启动程序的app.manifest文件,并设置requestedExecutionLevel属性为requireAdministrator,可以确保应用程序以管理员权限运行,从而避免调试过程中的权限限制。
2449

被折叠的 条评论
为什么被折叠?



