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

查看:37
本文介绍了包管理初始化失败:打开 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<用户名>AppDataRoamingMicrosoftVisualStudio15.<版本>ActivityLog.xml

You can get more information by examining the file:
C:Users<username>AppDataRoamingMicrosoftVisualStudio15.<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:

值不在预期范围内

我按照 this answer 并做了 'devenv/setup',之后我开始收到 Package management initialization failed: Access Denied.打开VS时出错.现在 Visual Studio 甚至都没有启动.

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%AppdataLocalMicrosoftVisualStudio15.0_<版本号>

C:users\%username%AppdataLocalMicrosoftVisualStudio15.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天全站免登陆