程序包管理初始化失败:打开Visual Studio 2017时访问被拒绝错误 [英] Package management initialization failed: Access Denied Error when opening Visual Studio 2017

查看:1213
本文介绍了程序包管理初始化失败:打开Visual Studio 2017时访问被拒绝错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7 64位上打开VS 2017时出现以下错误:

I'm getting the following error when opening VS 2017 on Windows 7 64-bit:

包装管理初始化失败:访问被拒绝.

Package management initialization failed: Access Denied.

您可以通过检查文件来获取更多信息:
C:\ Users \<用户名> \ AppData \ Roaming \ Microsoft \ VisualStudio \15.< version> \ ActivityLog.xml

You can get more information by examining the file:
C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\15.<version>\ActivityLog.xml


将解决方案添加到SVN之后,一切都开始了.在尝试添加文件并出现以下错误之前,我没有任何问题:


It all started after I added my solution to SVN. I had no problems until I tried to add a file and got the following error:

值不在预期范围内

Value does not fall within the expected range

我按照

I followed the steps mentioned in this answer and did a 'devenv /setup', after that I started getting the Package management initialization failed: Access Denied. error when opening VS. Now Visual Studio doesn't even start.

还有其他人遇到此问题并解决了吗?

Has anyone else experienced this problem and resolved it?

我尝试以管理员身份开始工作,并且成功了.但是否则就不会.

I tried starting as an administrator and it worked. But otherwise it doesn't.

推荐答案

原来,这是一个在之后启动Visual Studio时,也会发生此错误.更新.

It turns out that this is a bug, that hasn't yet been resolved. This error also occurs when starting Visual Studio after an update.

但是从从以下文件夹中删除privateregistry.bin文件:

Delete the privateregistry.bin file from the following folder:

C:\ users \%username%\ Appdata \ Local \ Microsoft \ VisualStudio \ 15.0_<版本ID> \

C:\users\%username%\Appdata\Local\Microsoft\VisualStudio\15.0_<version id>\

但是,这是一个临时修复程序,会重置用户的首选项.这就是为什么我以管理员身份启动它时会起作用的原因,因为该问题是特定于用户的.

This is however a temporary fix and resets the user's preferences. That's why it worked when I started it as an administrator, since the problem is user specific.

据说该错误已在Visual Studio的最新版本中修复.但是要使该错误修复生效,仍然需要删除旧的privateregistry.bin文件.

This bug is supposedly fixed in the latest versions of Visual Studio. But for the bug fix to work, the old privateregistry.bin file still needs to be deleted.

这篇关于程序包管理初始化失败:打开Visual Studio 2017时访问被拒绝错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆