简体   繁体   English

JetBrains Rider C#应用程序需要管理员权限

[英]JetBrains Rider C# Application Requiring Administrator Privileges

I'm trying to guess how to require administrator privileges for my application in JetBrains Rider . 我试图猜测如何在JetBrains Rider中为我的应用程序要求管理员权限。 In Visual Studio there's the option to add "App.manifest" file, where you can set the property <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> and the application will require administrator privileges. Visual Studio中,可以选择添加“App.manifest”文件,您可以在其中设置属性<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> ,并且应用程序将需要管理员权限。

I find no way to do this in JetBrains Rider . 我发现在JetBrains Rider中没办法做到这一点。 How can I request administrator privileges using JetBrains Rider ? 如何使用JetBrains Rider请求管理员权限?

I'm developing a .NetFramework application using C# language. 我正在使用C#语言开发.NetFramework应用程序。 And this is my project structure: 这是我的项目结构:

Thanks in advance. 提前致谢。

I don't think there is a visual way for doing this on Rider, but you can manually do this by adding the ApplicationManifest tag to your .csproj file. 我不认为在Rider上有这样做的可视方式,但您可以通过将ApplicationManifest标记添加到.csproj文件来手动执行此操作。

<PropertyGroup>
    <ApplicationManifest>path/to/app/manifest/app.manifest</ApplicationManifest>
</PropertyGroup>

Then, create your app.manifest file and configure it the way you want! 然后,创建您的app.manifest文件并按照您想要的方式进行配置! (The app.manifest is usually located at your app Properties folder) (app.manifest通常位于您的app属性文件夹中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM