Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

Package management initialization failed: Access Denied Error when opening Visual Studio 2017

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

Package management initialization failed: Access Denied.

You can get more information by examining the file:
C:Users<username>AppDataRoamingMicrosoftVisualStudio15.<version>ActivityLog.xml


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?

Edit:

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

question from:https://stackoverflow.com/questions/46955197/package-management-initialization-failed-access-denied-error-when-opening-visua

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

But there is a workaround from this thread that worked for me,

Delete the privateregistry.bin file from the following folder:

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.


Update

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...