visual-studio 停止 Visual Studio 询问每个项目:已在环境外修改。你想重新加载吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3619725/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:24:40  来源:igfitidea点击:

Stop Visual Studio asking for each project: has been modified outside the environment. Do you wish to reload?

visual-studio

提问by Squirrel

Do you wish to reload the project? Where's the Reload All option. Vote for this question and hopefully MS will implement a fix in VS2020.

您要重新加载项目吗?重新加载所有选项在哪里。为这个问题投票,希望 MS 将在 VS2020 中实施修复。

With pleany of projects in a solution I for one dread doing an svn update.

在一个解决方案中有很多项目,我害怕做 svn 更新。

This has been an issue from VS2003 but after a decade of clicking mindlessly on buttons it's getting on my wick.

这一直是 VS2003 的一个问题,但在十年无意识地点击按钮后,它越来越让我着迷。

Does anyone have a hack / registry entry / secret way of saying yes short of saying ignore (quick), closing and reloading the solution?

有没有人有一个黑客/注册表项/秘密方式说是,而不是说忽略(快速),关闭并重新加载解决方案?

回答by JaredPar

There are a couple of options you can tweak for this scenario. Both are under the Documents Options

您可以针对这种情况调整几个选项。两者都在文档选项下

  • Tools -> Options
  • Environment -> Documents
  • 工具 -> 选项
  • 环境 -> 文档

The first option is to just uncheck "Detect when files changed outside the environment". This will stop the reload dialog but will force you to manually reload.

第一个选项是取消选中“检测文件在环境外更改的时间”。这将停止重新加载对话框,但会强制您手动重新加载。

The second option just below it is a bit better "Auto-load changes, if saved". This will just automatically load the changes without prompting you for every project.

它下方的第二个选项更好一些“自动加载更改,如果保存”。这只会自动加载更改,而不会提示您输入每个项目。

Personally though I would go a slightly different route here. The problem is occuring because your managing your source code control outside of Visual Studio. If you switched to using an addin to manage within Visual Studio it would remove these problems altogether. For svn there are several free packages available including Ankhsvnwhich is fairly popular

就个人而言,我会在这里走一条略有不同的路线。出现问题是因为您在 Visual Studio 之外管理源代码控制。如果您改用插件在 Visual Studio 中进行管理,它将完全消除这些问题。对于 svn,有几个免费软件包可用,包括相当流行的Ankhsvn

回答by Serapth

http://msdn.microsoft.com/en-us/library/ms165643(VS.80).aspx

http://msdn.microsoft.com/en-us/library/ms165643(VS.80).aspx

DetectFileChangesOutsideIDE

DetectFileChangesOutsideIDE

Get/Set (Boolean)

获取/设置(布尔值)

Determines whether the environment automatically reloads files opened in the IDE when the operating system notifies the IDE that the files have been modified on disk.

确定当操作系统通知 IDE 磁盘上的文件已被修改时,环境是否自动重新加载在 IDE 中打开的文件。

EDIT: Some clarification, as that page isn't immediately obvious.

编辑:一些澄清,因为该页面不是很明显。

Tools Menu->Options -> Environment->Documents->Uncheck Detect when file is changed outside the Environment

工具菜单->选项->环境->文档->取消选中检测文件在环境外更改时