我有简单的控制台应用程序,它将在注册表中进行一些更改,因此我需要将其作为管理员运行。为此,我使用以下内容添加app.manifest:
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="RegisterEditor.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel evel="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
之后,我开始收到错误:
Cannot start application because of wrong configuration. Check manifest file for errors.
我该如何解决这个问题?
答案 0 :(得分:1)
您的清单中似乎有一种类型。属性名称应为level
,而不是&#39; evel&#39;:
<requestedExecutionLevel level=”requireAdministrator”/>