Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
236 views
in Technique[技术] by (71.8m points)

Does using Visual Studio with TFS require a persistent connection to TFS from VS?

I'm an IT project manager. A developer on my team is complaining that she keeps losing her connection to TFS and that VS requires a constant connection to TFS to work for her. Our CIO is asking me why she doesn't only need a connection to TFS while checking in and out code. I do not know the answer.

Thank you, Val


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

1 Answer

0 votes
by (71.8m points)

TFVC, Team Foundation Version Control, is one of the ways to store sources in Team Foundation Server (TFS), if your TFS serves is 2015 or later, Git is the new default. TFVC is a centralized version control system and assumes your developer has a persistent connection to the server. This is especially true when the workspace of the developer is configured as a "server" workspace, in which case each file system operation is synced to the central server.

In Workspace Type = Server mode your options are:

  • Use the Go Offline option to temporarily disconnect from the server and work locally in isolation.
  • Of Change the workspace type to local, which creates a local folder with a compressed copy of each file in the workspace.

This will reduce the number of interactions with the server, making it more pleasant to work when authentication is messed up. But a developer should be checking in and out code at a regular interval, preferably each change that puts the code in a stable state. I'd get VERY frustrated when even something as a checkin/checkout requires an auth prompt.

But your real problem

Is not whether TFS is prompting for auth, it's why the workstation or the server infra isn't (allowing the) caching of the credentials. This can have many causes:

  • The TFS server isn't configured with a secure connection (https)
  • The TFS server name doesn't match the server configuration
  • A proxy server is interfering
  • A local development proxy (like Fiddler) is turned on and not configured to ignore the TFS server
  • The Active Directory policy is forcing the credentials to not be stored
  • The TPM of the computer isn't working well and keeps resetting
  • There is a VPN interfering
  • Some endpoint monitoring system is detecting suspicious behavior and is triggering a re-auth
  • An incorrect credential is cached in the Windows Credential Manager.
  • The TFS server is in the wrong internet security zone
  • The Internet security zone settings are configured to not store credentials
  • ...
  • ...

Solve that and the developer will be much happier.

And TFVC is getting old (and most teams have moved to Git)

As others already commented, TFVC is getting old and many development teams have migrated to Git. Git gives developers a local copy of the sources and its history to work with, giving much more power to the developers to work locally without a need to connect to a central server.

If migration isn't an option (yet), tools like git tfs can help a developer to start working in Git locally, while still connecting to a central TFVC server to send the changes to the rest of the team.

But the long-term solution is to upgrade your development tools and get rid of TFVC.

TFS is getting old (is now Azure DevOps Server)

And while you're at it, TFS is getting old. It has been renamed in 2018 and is now called Azure DevOps Server. Azure DevOps Server 2020 is the latest. If you're having issues with TFS, making sure it's up to date and installed on a recent Windows Server version helps too.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...