Auto discover Team Foundation Server - visual-studio

I've searched the web and can't find a way to have a local Team Foundation Server auto discovered by Visual Studio.
Is it possible to configure it in e.g. Active Directory or the DNS server?

No, It's not possible.
VS use Team Explorer to connect to TFS, we have to provide the credential to add the TFS server first. The TFS server information is stored with Team Explorer. So, we can do nothing in AD or DNS server.
Once created the connection, the second time to start VS, it will automatically connect to the TFS server.

Related

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.

Where does the Server information come from in a Workspace definition?

I have an error where everytime I open Visual Studio, I get the following error:
TF205020: Could not connect to server ‘tfs.server.com\collectionname’. This server was used in your last session, but it might be offline or unreachable. Confirm that the server is available on the network. To attempt to connect again, or to a different server, click ‘Connect To Team Foundation Server’ in Team Explorer or the Team menu.
The server returned the following error: TF400324: Team Foundation services are not available from server tfs.server.com\collectionname.
Technical information (for administrator):
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.We were unable to automatically populate your Visual Studio Online accounts.
This is an on-premise TFS 2013 Update 4.
I always get this error when starting Visual Studio and I have to go into Team Explorer and explicitly connect to the server to get it to connect correctly.
The issue is that the URL in the error above is wrong. It is missing a virtual directory.
Correct URL: https://tfs.server.com/tfs/collectionname
Url in Error: https://tfs.server.com/collectionname
As you can see the tfs directory is missing. I can see that the server is setup correctly in Team Explorer and I can also see that it is setup incorrectly in the Workspace configuration. Here is a picture of the workspace config.
My question is:
Where does this URL come from and why is it different to that stored in Team Explorer?
The URL is stored in your sln file. You can either do File -> Source Control -> Advanced -> Change Source Control
Or you could crack open the sln file in notepad and change it there.
I would recommend brute force approach first. Delete that workspace and create new one from scratch.

How to switch TFS server for TFS PowerShell Extension

How do you switch the TFS server in the TFS PowerShell Extension?
I have been using the TFS PowerShell extension for quite some time and we recently moved to a different TFS server. The extension seems to still be pointing to the old server because it gives me an error message that the collection has been stopped. I switched the Team Foundation Explorer in VS to the new server and that works fine but this TFS PowerShell extension refuses to cooperate and wants to keep pointing to the old server. How do I repoint to the new server? Is there some INI? Some CONFIG file I need to change? Some registry entry?
try clearing your cache
# C:\Users\JusttTFS\AppData\Local\Microsoft\Team Foundation\4.0\Cache

TF31002: Unable to connect to this Team Foundation Server for VS 2010, VS 2012 is connected to same server from same machine

I have VS2012 and VS2010 on the same machine. VS2012 is connected to Team Foundation Server (now VSOL/Visual Studio Online) but, VS2010 gives below error when trying to add Team Foundation Server (now Visual Studio Online) to the list.
TF31002: Unable to connect to this Team Foundation Server
Possible reasons for failure include:
-The name, port number or protocol for TFS is incorrect.
-The team foundation server is offline.
-Password has expired or is incorrect.
For further information, contact Team Foundation Server administrator.
I believe VS2010 requires VS2010 Service Pack 1 and a compatibility patch (http://www.microsoft.com/en-us/download/details.aspx?id=29082) to connect to TFS 2012. Do you have those?
To fix this, you need to run the TFSConfig command with the ChangeServerID parameter as follows:
1) Open elevated command prompt and change current directory to c:\Program Files\Microsoft TeamFoundation Server 12.0\Tools
2) Execute “TfsServiceControl.exe quiesce”
3) Execute tfsconfig changeserverid /sqlinstance: /DatabaseName:Tfs_Configuration /projectcollectionsonly .
Make sure to pass projectcollectionsonly parameter.
4) Execute “TfsServiceControl.exe unquiesce”
This can happen when you have done a full scan(Anti -Virus) to your laptop -> TFS work space don't connect to the TFS server and gives TF31002: Unable to connect to this Team Foundation Server Error.
Reason: Full Anti-Virus scan to a machine un-mounts and mounts the network drives, which leads to breaks the mapping of local drive to the TFS server path.
Solution:
1. Clear the cookies in following path
c:\Users\jekumar\AppData\Roaming\Microsoft\Windows\Cookies
2. If it still doesn’t help
a. Disconnect from Team Foundation server ( VS IDE -> Team-> Disconnect from Team Foundation Server)
b. Rename the locally mapped folders
c. Now connect to Team Foundation server ( VS IDE -> Team-> Connect to Team Foundation Server)

Visual Studio and Umbraco setup through Remote Control

I'm new to umbraco and have recently downloaded visual studio with the objective of setting it all up and getting it all to work. However, fact remains that I'm not suceeding and I've not been able to find any post related to this topic on the internet.
The scenario is simple:
I connect to a Windows Small Business Server through a gateway as: remote.mysite.com.
In that connection I log on to another server where I finally find the root directory of the umbraco installation.
How would I synchronize Visual Studio with that Umbraco folder, so I don't have to transfer files all the time?
Any help would be appreciated much!
Best regards,
Brinck10
If you want to avoid having to do an XCOPY deployment of your code to that distant server, Visual Studio will need to have a network connection.
You could set up an SSTP VPN connection through your Small Business Server and connect to the Umbraco server
You could also set up an FTP server on your Umbraco server but you'd need to also make exceptions on your office firewall.
You can also watch this video by Scott Hanselman.

Resources