如何在Visual Studio 17.6.2中禁用多个仓库?

huangapple go评论56阅读模式
英文:

How to disable multi-repo in Visual Studio 17.6.2?

问题

After the latest update, Visual Studio 2022 started offering me this new multi-repo feature.

我在最新的更新后,Visual Studio 2022开始提供这个新的多仓库功能。

I remember disabling it previously since I had issues with it then too. Since this is no longer a preview feature, there's no toggle to disable it as I did in the previous patches.

我记得以前曾经禁用它,因为当时我也遇到了问题。由于这不再是一个预览功能,所以没有切换按钮来禁用它,就像我在之前的补丁中所做的那样。

I understand the premise of it, but for me, it auto-detects the wrong repositories as related, and there is no way to unlink the repositories. I don't even know how it decides which repositories are supposed to be opened together since I do not opt-in at any point.

我理解它的前提,但对我来说,它会自动将错误的仓库识别为相关的,而且没有办法取消关联这些仓库。我甚至不知道它是如何决定应该一起打开哪些仓库的,因为我在任何时候都没有选择启用它。

Does anyone know how to disable it in the latest versions or at least have it not automatically open multiple repositories, or remove repositories from the "active repositories" list?

有人知道如何在最新版本中禁用它,或者至少让它不会自动打开多个仓库,或者从“活动仓库”列表中删除仓库吗?

PS: I know of the other question on SO, but that one relates to an older version of VS.

附注:我知道Stack Overflow上有另一个问题,但那个问题与较旧版本的Visual Studio有关。

Edit 1:

编辑1:

There's nothing special about the directory structure. It detects some absolutely unrelated applications as being a multi-repo solution. The only thing they have in common is the company prefix.

目录结构没有什么特别的。它将一些完全不相关的应用程序检测为多仓库解决方案。它们唯一的共同点就是公司前缀。

Edit 2:

编辑2:

Here's what the "Preview Features" tab looks like

这是“预览功能”选项卡的样子

如何在Visual Studio 17.6.2中禁用多个仓库?

如何在Visual Studio 17.6.2中禁用多个仓库?

Edit 3:

编辑3:

I ended up trying a lot of things, re-cloning the repositories, clearing VS caches, cleaning the registry, renaming directories, renaming repositories, etc.

最终,我尝试了很多方法,重新克隆仓库,清除了VS缓存,清理了注册表,重命名了目录,重命名了仓库等等。

None of this helped. As soon as I would clone some (unrelated) repositories under the same directory it automatically detected the repositories as a multi-repo solution and would load them on start. Weirdly enough it would do that only when opening solutions in some of the auto-detected repositories but not others.

但这一切都没有帮助。只要我在同一目录下克隆一些(不相关的)仓库,它就会自动将这些仓库检测为多仓库解决方案,并在启动时加载它们。奇怪的是,它只会在打开一些自动检测到的仓库中的解决方案时才会这样做,而不会在其他仓库中这样做。

The only thing that helped is creating additional nested hierarchies of directories for my repositories. Since I had around 50 repos in the same folder, it took a while to move them around. And what's funnier it doesn't detect the actually related repositories.

唯一有帮助的方法是为我的仓库创建额外的嵌套目录层次结构。因为我在同一个文件夹中有大约50个仓库,所以移动它们需要一些时间。更有趣的是,它并没有检测到实际相关的仓库。

英文:

After the latest update Visual Studio 2022 started offering me this new multi-repo feature.

I remember disabling it previously since I had issues with it then too. Since this is no longer a preview feature there's no toggle to disable it as I did in the previous patches.

I understand the premise of it, but for me it auto-detects the wrong repositories as related, and there is no way to unlink the repositories. I don't even know how it decides which repositories are supposed to be opened together since I do not opt-in at any point.

Does anyone know how to disable it in the latest versions or at least have it not automatically open multiple repositories, or remove repositories from the "active repositories" list?

PS: I know of the other question on SO, but that one relates to an older version of VS.

Edit 1:

There's nothing special about the directory structure. It detects some absolutely unrelated applications as being a multi-repo solution. The only thing they have in common is the company prefix.

C:
└── src
    ├── Acme.WebSite
    └── Acme.SomeApi

There are more solutions like these. Some open as multi-repo some as single repo. Couldn't figure out a correlation between the repos.

Edit 2:

Here's what the "Preview Features" tab looks like

如何在Visual Studio 17.6.2中禁用多个仓库?

Edit 3:

I ended up trying a lot of things, re-cloning the repositories, clearing VS caches, cleaning the registry, renaming directories, renaming repositories, etc.

None of this helped. As soon as I would clone some (unrelated) repositories under the same directory it automatically detected the repositories as a multi-repo solution and would load them on start. Weirdly enough it would do that only when opening solutions in some of the auto-detected repositories but not others.

The only thing that helped is creating additional nested hierarchies of directories for my repositories. Since I had around 50 repos in the same folder it took a while to move them around. And what's funnier it doesn't detect the actually related repositories.

答案1

得分: 2

显然,一些解决方案文件包含了偶尔与相邻存储库中的项目匹配的相对路径。

这就是为什么解决方案似乎会被Visual Studio随机加载在一起的原因。

由于每个人都有相同的目录结构,而且项目很少改变,所以这个问题一直未被注意,直到我对这个奇怪的Visual Studio功能感到不满。

英文:

Apparently some solution files contained relative paths that occasionally matched projects from neighboring repositories.

That's why solutions seemed to randomly be loaded together by VS.

Since everyone had the same directory structure, and projects were rarely changed the problem went unnoticed for a while, only to be uncovered by my annoyance this weird VS feature.

huangapple
  • 本文由 发表于 2023年6月5日 15:24:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76404266.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定