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
590 views
in Technique[技术] by (71.8m points)

visual studio - "Value does not fall within the expected range" when trying to add a reference in a project

Suddenly I am getting this error "Value does not fall within the expected range" whenever I try to add a reference to any project. This also happens with a new blank project. It can list the current references fine.

I rebooted the computer. I am not sure if the recent Update 2 caused this. This is my first add reference since the update. I am using Visual Studio 2013 on Windows 7 64bit.

Any ideas?

enter image description here

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

I did a 'devenv /setup' and that fixed it.

Detail

  • Exit Visual Studio
  • Click Start
  • Type cmd, right click Command Prompt and select Run as administrator
  • Navigate to the appropriate Visual Studio folder
    VS2012: pushd %programfiles(x86)%Microsoft Visual Studio 12.0Common7IDE
    VS2015: pushd %programfiles(x86)%Microsoft Visual Studio 14.0Common7IDE
    VS2017: pushd %programfiles(x86)%Microsoft Visual Studio2017<Edition>Common7IDE
    VS2019: pushd %programfiles(x86)%Microsoft Visual Studio2019<Edition>Common7IDE

  • Type devenv /setup and press enter

  • When the command prompt returns, you're done. Close the command window, reopen Visual Studio, and test to see if the error's resolved.

More Information

https://msdn.microsoft.com/en-us/library/ex6a2fad.aspx


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

...