简体   繁体   English

如何在 Visual Studio 2017 或 2019 中断开项目解决方案与 TFS 的连接?

[英]How to disconnect project solution from TFS in Visual Studio 2017 or 2019?

I have a solution which was connected with TFS.我有一个与 TFS 相关的解决方案。 Whenever I try to install new library in the solution, I get an error:每当我尝试在解决方案中安装新库时,都会出现错误:

Unauthorised (410)未经授权 (410)

I have tried to delete all TFS-related files from solution, but I'm still getting that same error.我试图从解决方案中删除所有与 TFS 相关的文件,但我仍然遇到同样的错误。

Has anyone faced the same issue and resolved it somehow?有没有人遇到过同样的问题并以某种方式解决了它?

Verified solution经验证的解决方案

SOLUTION 1解决方案 1

For permanently and completely detach the solution from source control, Do the following steps:要永久且完全地将解决方案与源代码管理分离,请执行以下步骤:

  1. Click the 'No' button to avoid connecting to TFS.单击“否”按钮以避免连接到 TFS。
  2. In the file menu, go to the source control options and clear the bindings.在文件菜单中,转到源代码管理选项并清除绑定。 You'll specifically want File menu - Source Control - Advanced - Change Source Control...你会特别想要File menu - Source Control - Advanced - Change Source Control...
  3. Save the solution.保存解决方案。

Next time you open the solution you won't be prompted to connect to TFS.下次打开解决方案时,系统不会提示您连接到 TFS。

SOLUTION 2解决方案 2

To completely remove TFS source control binding follow these two steps:要完全删除 TFS 源代码控制绑定,请执行以下两个步骤:

  1. Go to your solution's folder, find and delete all files with *.vssscc and *.vspscc extensions.转到您的解决方案文件夹,查找并删除所有扩展名为*.vssscc*.vspscc文件。
  2. Open your solution's .sln file in Notepad, and find & remove the GlobalSection(TeamFoundationVersionControl) section.在记事本中打开解决方案的.sln文件,然后找到并删除GlobalSection(TeamFoundationVersionControl)部分。

Reference Link 参考链接

From: Remove TFS Connection From Solution来自: 从解决方案中删除 TFS 连接

Afaik, errors starting with 4XX is caused by wrong credentials. Afaik,以 4XX 开头的错误是由错误的凭据引起的。 With that perspective, you can try disconnect from the server then reconnect via from Team->Disconnect from server从这个角度来看,您可以尝试断开与服务器的连接,然后通过从 Team->Disconnect from server 重新连接

Also unbind the project and bind again;同样解绑项目,重新绑定; File->Source Control->Advanced->Change Source Control文件->源代码管理->高级->更改源代码管理

Hope, it helps.希望能帮助到你。

Make sure you have deleted all related files locally.确保您已在本地删除所有相关文件。 To completely remove TFS source control binding follow these two steps:要完全删除 TFS 源代码控制绑定,请执行以下两个步骤:

  1. Go to your solution's folder, find and delete all files with *.vssscc and *.vspscc extensions.转到您的解决方案文件夹,查找并删除所有扩展名为*.vssscc*.vspscc文件。
  2. Open your solution's .sln file in Notepad, and find & remove the GlobalSection(TeamFoundationVersionControl) section.在记事本中打开解决方案的.sln文件,然后找到并删除GlobalSection(TeamFoundationVersionControl)部分。

GlobalSection(TeamFoundationVersionControl) = preSolution <code> SccNumberOfProjects = 2 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = <YourTFSURL> SccLocalPath0 = . SccProjectUniqueName1 = . SccLocalPath1 = . EndGlobalSection

More detail steps please take a look at this blog here: Reference Link .更多详细步骤请看这里的博客: 参考链接

If you still get issue, also close VS, clear TFS and VS cache .如果您仍然遇到问题,请关闭 VS, 清除 TFS 和 VS 缓存 Then open VS again, which may do the trick.然后再次打开 VS,这可能会奏效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Visual Studio 2017中创建MVC项目? - How to create MVC project in visual studio 2017? 如何将 Angular 9 SPA 项目和 ASP.NET Core 2.2 MVC 项目组合成一个 Visual Studio 2017 解决方案? - How can I combine an Angular 9 SPA project and an ASP.NET Core 2.2 MVC project into a single Visual Studio 2017 Solution? Visual Studio 2017 / 2019 添加缺少的区域 - Visual studio 2017 / 2019 add areas missing Visual Studio 2019 社区上 TFS 的问题:将文件上传到 TFS - Issues with TFS on Visual Studio 2019 Community: Uploading files to TFS 2015年以来的Visual Studio项目在VS 2017调试中变慢 - Visual Studio project from 2015 became slow in VS 2017 debug 从 VS 2019 运行 VS 2017 项目? - Running a VS 2017 project from VS 2019? IIS 不运行 Visual Studio 2017 中的项目 - IIS does not run the project in Visual Studio 2017 Visual Studio 2017-当我“向源代码管理中添加解决方案”时如何禁用自动提交 - Visual Studio 2017 - How to Disable Auto Commit When I “Add Solution to Source Control” Visual Studio 2012,tfs项目加载失败 - visual studio 2012 ,tfs project loading failed 如何在Visual Studio 2017上将通过NPM安装的库包含到我的MVC项目中 - How do I include libraries that installed via NPM to my MVC project on Visual Studio 2017
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM