C# 程序在已使用清单时不要求管理员权限

C# 程序在已使用清单时不要求管理员权限,c#,.net,manifest,administrator,C#,.net,Manifest,Administrator,我的程序没有要求管理员权限,但我的项目中确实包含一个清单文件,我正确加载了它,它只是不想修复代码中的错误。我会发布清单文件,但我几乎可以肯定它很好: <?xml version="1.0" encoding="utf-8"?> <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node--> <!--<sup

我的程序没有要求管理员权限,但我的项目中确实包含一个清单文件,我正确加载了它,它只是不想修复代码中的错误。我会发布清单文件,但我几乎可以肯定它很好:

<?xml version="1.0" encoding="utf-8"?>
  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>
-->

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>
以下是我在项目中使用的设置:

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>
我得到的错误是:

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>
上面写着: Win32异常未处理,并非所有引用的权限或组都分配给调用方

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

我能得到任何帮助吗?这样我就可以让我的程序请求管理员权限,这样它就可以正常运行了?

您需要修改

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>

请看这里:

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

</application>