1. 在解决方案的属性里面- 安全性,找到启用ClickOnce安全设置
2. 勾选
3. 勾选后,你将发现项目里面多出了一个app.manifest文件,点进去
4. 找到代码段<requestedExecutionLevel level="asInvoker" uiAccess="false" />
将其改为:<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
5. 取消勾选
6. 重新编译
参考来源:
Today's comments have reached the limit. If you want to comment, please wait until tomorrow (UTC-Time).
There is 20h04m00s left until you can comment.