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.
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 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.
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
I am trying to integrate our TFS with an external tool (Sonar) and for this Sonar needs the $tf folder that is supposedly (according to MS documentation) is supposed to exist on local workspaces.
I actually never seen this folder in any local environment before.
why am I not seeing this folder?
how can I have TFS/VS create it?
a few notes:
I looked for hidden files.
using VS 2010 premium / VS2013 premium and TFS2010
TFS and VS2010 don't support local workspaces. You'll need to upgrade both to at least 2012 (ideally, 2013) in order to use them.
Source control is acting wierd.
Here is the scenario:
I had to reformat my computer. I backed everything up first, then blew it away. All of my backup is located on a virtual harddrive on the network, which I can connect to in order to grab what I need temporarily.
I have re-added my website / project to the same file location but now source control doesn't seem to be working.
I have made some edits which I believe the second developer does not have.
Also, the second developer has made some new edits to the website and because I am not properly hooked in to source control I cannot get those changes.
Does anyone have any ideas on what the problem could be?
Your local machine keeps a cache of the server and local workspace configuration - you will need to rebuild this cache. In addition, your Team Foundation Server workspace is tied to your original computer (workspaces are uniquely identified by your local hostname, the workstation name, and your username.) If your hostname has changed on your new computer, the server will not be able to find your existing workspace and thus it will not be able to participate in source control.
If your hostname is the same and you have copied all of your source tree over to the identical location, you should be able to simply rebuild your workspace cache on your new machine. As soon as you connect to the server (using Team Explorer in Visual Studio, or with the tf command line client) your workspace cache will get rebuild and you should have a copy of the pending changes you had on your old computer.
If, however, your workstation's hostname has changed, you can update the the hostname associated with your old workspaces. You can do this by running the command:
tf workspaces /updateComputerName:oldComputerName /collection:http://tfsserver:8080/tfs/MyCollection
Finally, you have one other option: you can simply create a new workspace and copy your changes in. You would do this by creating a new TFS workspace, getting the latest version of the code to a different directory, copying your changes over, and then detecting those changes and pending them to the server by using tfpt online from the Team Foundation Server Power Tools.