“值不在预期范围内"尝试在项目中添加引用时 [英] "Value does not fall within the expected range" when trying to add a reference in a project

查看:34
本文介绍了“值不在预期范围内"尝试在项目中添加引用时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试添加对任何项目的引用时,我都会突然收到此错误值不在预期范围内".新的空白项目也会发生这种情况.它可以很好地列出当前的参考文献.

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.

我重新启动了计算机.我不确定最近的更新 2 是否导致了这种情况.这是自更新以来我的第一个添加参考.我在 Windows 7 64 位上使用 Visual Studio 2013.

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.

有什么想法吗?

推荐答案

我做了一个 'devenv/setup' 并修复了它.

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

细节

  • 退出 Visual Studio
  • 点击开始
  • 输入cmd,右击Command Prompt,选择以管理员身份运行
  • 导航到相应的 Visual Studio 文件夹
    VS2012:pushd %programfiles(x86)%Microsoft Visual Studio 12.0Common7IDE
    VS2015:pushd %programfiles(x86)%Microsoft Visual Studio 14.0Common7IDE
    VS2017:pushd %programfiles(x86)%Microsoft Visual Studio2017Common7IDE
    VS2019:pushd %programfiles(x86)%Microsoft Visual Studio2019Common7IDE

  • 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

输入 devenv/setup 并回车

更多信息

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

这篇关于“值不在预期范围内"尝试在项目中添加引用时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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