简体   繁体   中英

Setup a local TFS/TFVC repository in VS2015

I want to create a new project in VS2015 and set it up to use TFVC instead of Git.

I changed the source control plugin to Visual Studio Team Foundation Server from Tools->Options->Source Control->Plug-in Selection, and I created a new project with "Add to Source Control" checked, but the project is still created with a Git repo.

在此输入图像描述

I also tried adding a server connection from Team Explorer->Manage Connections->Servers...->Add..., but there was no server at http://localhost:8080/tfs (I assume it's not install by default).

在此输入图像描述

My question is how can I work on a TFS repository that is local to my computer (it's OK to use a server so long as it's on localhost).

You have to install Team Foundation Server on your local computer.
This is a separate download and not a part of Visual Studio.
According to the system requirements , TFS (starting with 2013) can only be installed on a 64-bit OS. You don't need to install SharePoint or any other part of TFS that you won't use (like for example Build Services).

You also need an instance of SQL Server running on your local computer. TFS will create a bunch of databases on this instance where it stores its internal data. If you don't have a license for SQL Server, you can use the Express Editions of TFS and SQL Server both for free. These Express Editions are recommended by Microsoft (see previous links) if you plan to use TFS only on you local computer, but of course you can use a paid edition as well if you need some special feature.

After installing TFS you have to create a Team Project Collection in the TFS Administration Console which can be found in the Start menu. Then add a new connection in the Team Explorer as shown in your screenshot and create a new Workspace ( Source Control Explorer --> Workspace --> Add ) with a Working Folder that matches the local directory containing your source files.

The URL of the TFS is the one that was set in the Application Tier of the TFS Administration Console. ( http://localhost:8080/tfs is the default URL.)
As far as I know it's not possible to use a TFS/TFVC without installing and configuring a full Team Foundation Server reachable by a URL, but of course anything can be limited to be usable only on your local computer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM