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
Related
I have a couple of ASP.NET Core based projects being developed using Visual Studio 2019.
I am having issues where my workspace and TFS server on Azure-DevOps are out of sync. My PC contains the most recent code and I want to push everything I have on the server. I don't really care about the status of the TFS server as it is wrong. I just want to force everything to get pushed to ensure my PC and TFS are syncing again.
How can I force the TFS on Azure-DevOps to take all my files? I don't even mind removing the project altogether from Azure-DevOps and push all files as if this is a new project.
According to your description, sounds like there is something wrong with your source control binding. Or maybe some files outside of Visual Studio do not detect by TFS server. Which cause your workspace and TFS server out of sync.
If you want TFS server detect changes done to files outside of Visual Studio, the simplest way is using local workspace.
Now anything else changes files outside Visual Studio, your workspace detects the changes automatically.
It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under `Excluded Changes
If you are using server workspace, this is kind like when you are offline, you cannot work with your local files because they are read-only until you check them out. So highly recommend you switch to local workspace, you just need to make sure you open the files in VS from a path which the same as your TFS local worksapce. Then it will auto sync changes in Visual Studio and show in pending changes.
More detailed information on the pros and cons of local and server workspaces, please refer our official link.
Now in your situation, we suggest you fist back up all of your local codes/files first. Then delete your old workspace, create a new local workspace.
Get latest from your sever, then copy all your back up to your workspace folder. Then let windows file system auto detect the difference between them, replace files download from server with your back up local version.
Now your local workspace should contain the latest version of your code/file, Visual Studio will auto detect the changes and list them in pending changes, if something added in excluded list, manually promote them.
Finally you could just check in/push all pending changes to TFS server. Now everything back to the track again.
Hope this helps.
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.
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.
I am using Visual Studio 2015. Initially I installed TFS 2013 on my local machine with source control mappings to my local User folder. After some time there was a need to include some more developers to my project so I installed TFS 2013 on a server running Windows Server 2012.
Then I UnBind my solution from local TFS and tried to add it to the TFS on the server. But it was only taking my local TFS, so I uninstalled TFS from my local machine. But then again when I tried to add my solution to the TFS on server, it gives the error shown in the image.
Then I removed my workspaces as mentioned in MSDN here
and here and then restarted my local machine but the error is still there.
Although I am creating the new workspace with exactly same name and place but when I have removed the older workspace and TFS from my local machine, wouldn't the error be removed!
May be TFS marked the workspaces somewhere in Computer registry but I don't know it. Kindly help me to solve this issue.
AWAIS is my local machine name
awais:8080/tfs was my older TFS that was on my local machine but I
already uninstalled it
You can use tf command-line to remove old workspace which clears cache as well:
tf workspaces /remove:* /collection:http://awais:8080/tfs/DefaultCollection
If it does not work, try removing from your connections on Team Explorer, deleting the local folder and clearing your cache
Use TFS Sidekicks to track the workspace, it is a great tool to manage the workspaces.
my machine died. I need to download the source to a new machine. I cannot access the old workspace on the new machine. There is no source on this new machine. I need to grab it from TFS 2010 basic.
What do I do??
First, you will not be able to access the old workspace on your new machine even when you do get a connection. You will be able to download any changes that you had checked in but not changes that you had made and not checked in.
You will need to connect to your TFS server from Visual Studio on your new machine. From the Team menu item select "Connect to Team Foundation Server..." and then connect to your TFS server. At that point you should be able to get latest like you had on your old box.