解决VS2017启动失败,提示Access Denied Error的问题

来源:互联网 发布:数据库的日志不可用 编辑:程序博客网 时间:2024/06/01 08:54

之前因为要用.NET Core相关的预研,装上了vs2017社区版。
最近在做编码规范支持的时候,安装完EditorConfig Language Service插件后,发现vs打不开了,提示Access Denied Error,在ActivityLog.xml的启动日志中提示Failure calling FinishInitialize.
由于提示到权限问题,我用本地管理员权限试验了一下,右键Run As Admin是能正常启动的,但日常使用用域成员权限是不能启动的,试图使用devenv /SafeMode,乃至于 devenv /resetsettings都全部提示初始化问题。感觉是在非常靠前的时机就出问题了
用万能的google搜索了一下,找到了这篇文章

这个讨论比较长,最后我是参考这个解决的

Make sure you are logged in as the regular non-elevated user you use for running Visual Studio
Export your current VS settings with Tools | Import and Export Settings…, as the next steps will cause your settings to be lost
Download the attached workaround.txt
Launch a “Developer command prompt for VS 2017”
Run “csc Workaround.txt /target:exe”
Run Workaround.exe and add as a parameter the directory where your privateregistry.bin file resides. For example: “workaround.exe c:\users\\appdata\local\Microsoft\VisualStudio\15.0_[UniqueID]”

需要注意的是,一开始我这么操作失败了,原因是我最早按VS提示的定位跑去看ActivityLog.xml所在的
C:\Users\chenrq\AppData\Roaming\Microsoft\VisualStudio\15.0_[UniqueID] 目录了,而实际上,需要操作的是
C:\Users\chenrq\AppData\Local\Microsoft\VisualStudio\15.0_[UniqueID] 这个目录

阅读全文
0 0
原创粉丝点击