Rebinding to TFS after pc was renamed - visual-studio-2010

Some as of yet unspecified domain error happened and my work computer had to be kicked off the domain, renamed, and added back. Now I can't seem to rebind my .net projects to our tfs repository. I've tried going to file/source control/change source control and rebinding, but that doesn't seem to fix anything. I thought I went in and updated my workspace name in tfs (or at least thought I did) and tried to rebind after that, then I started getting errors saying the file I was trying to check in wasn't in my workspace. I've seen several articles on unbinding/rebinding, but can't seem to find one that tells me how to rebind after my workspace name was changed.

You shouldn't have to delete the workspace. The computer name is a property on the workspace that can be changed without touching the files. Use tf.exe:
tf workspaces /updateComputerName:OldComputerName /s:http://Tfs_server:8080
you can have a look at this post for more details:
http://blogs.msdn.com/b/buckh/archive/2006/03/03/update-workspace.aspx

Related

How to Resolve TFS Issue when checking files in

I have a project under source control using TFS and Azure DevOps.
It all works normally except for one thing: When I check in a file, I get this error message:
TF10122: The path '$/KnowledgeBuilder/V2/$tf/1/1f8c47a1-8066-42d7-b56c-c9960b0ee7ea.gz' contains a '$' at the beginning of a path component. Remove the '$' and try again.
The check-in does in fact succeed, but I get three of the above error messages each time. I can simply ignore this, but it is starting to get annoying.
It appears the folder in question is a TFS created and controlled folder. I tried deleting the folder, but that remove the Project from Source Control, so I restored them.
Is there a way to resolve this?
This occurs in VS22 on a Blazor Server Project. I have tried opening the Project in VS19, making a change, and then checking it in, and it works fine. So, it must be something specific to VS22.
Someone, sometime, at some point, added that $tf folder to version control. It should not be there, ever, under any circumstances -- that's the folder that TFVC uses to track local workspaces. That's why removing it messes up your workspace.
Make sure any pending changes are committed or shelved first.
Remove that folder from source control. Make sure the change is checked in. You might need to use a server workspace to do this so that the $tf folder isn't relevant.
Use tf get to force a re-sync of your local workspace. tf get /all /overwrite should do the trick. If it doesn't, then just delete and recreate the workspace.
Add $tf to your .tfignore file (although if memory serves, that shouldn't be strictly necessary -- I haven't worked with TFVC in a few years)

TFS Connectivity and Ignore Issues

I am having some trouble with TFS:
I have ignore rules for certain files. For example:
\Build\Scripts*.sum
It does not seem to recognize this. But, if I exclude these files in the Visual Studio UI, it remembers that I excluded them for some time.Then I lose connectivity and I have to re-exclude them. Why doesnt the tfignore file seem to be working. This leads to:
I routinely lose the ability to connect to TFS. Ill be moving along happily working. then Ill go and check in some code and I will get the error that I do not have access to TFS. If I restart Visual Studio, I can then successfully connect and check in code. Things will be fine for a few hours, and then it will happen again. Why do I lose the ability to connect? And why does restarting fix it?
First make sure you were using the correctly .tfignore file.** This file does not have any suffix. One way to create it, suggest you to rename a new.txt file with "tfignore." It will auto change to right .tfignore file.
You can also use the auto automatically generated .tfignore file, follow below steps in my answer here.
More detail info about the .tfignore file please refer this tutorial.
Note: This .tfignore file will not affect with those files already in source control. You need to remove them from source control first. Also make sure your .tfignore files have checked in source control.
That sounds wired. get the error that I do not have access to TFS what's the detail error here? If restart Visual Studio, can then successfully connect and check in code. It shouldn't be a permission related issue.
One possibility is network related, double check and confirm if there is any instability of your network environment. If you are behind VPN, try to connect without VPN.
Since Restart Visual Studio fixed the issue, it also may related to cache. Try to clear TFS and VS cache, which may do the trick.
The issue was that TFS thought these items had been "added" although that was not entirely clear from Visual Studio UI. I had to go to the Source Control Explorer and look at the folder where these files were. They were listed as 'add' which is how I figured this out. I never explicitly added these files. I had to right click on these items and remove them.

Getting a "vspscc could not be found in your workspace, or you do not have permission to access it" error

Today, while trying to publish an app so I could test it, I suddenly got this error message:
The item
D:\ScratchSrc\TryNewReportViewer2017\TryNewReportViewer2017\TryNewReportViewer2017.csproj.vspscc
could not be found in your workspace, or you do not have permission to
access it.
That's a mystery to me, as I've never gotten this before and I was working with this app just last week. Publishing it, too.
I've looked for the .vspscc file. Found it exactly where it said it should be. So, the alternative is that I don't have permissions to it. I don't understand why I shouldn't have permissions to a file on my machine that I created, but whatever. So, how do I get permissions to my own file?
I'm working with VS 2017, TFS 2015 on premise.
This issue may due to the wrong source control binding for that specific xx.vspscc file.
Double check your source control bindings for that file in TFS. You could also try to unbind and rebind the file.
Then delete the file in local(back up local changes first) and get latest version from TFS. Finally do the publish again.
If above solution is still not working, try to delete local workspace and create a new one, get latest version of the file, modify the file with local changes (if you have) in your backup , check in the file, then do the publish .
Another reason for this problem is, that the vspscc file is not checked in.
Just do a "Compare" on the project folder to see, if it's missing.
If the csproj.vspscc is missing you can create a new one by removing the project in visual studio and adding it back
I was able to 'fix' the problem by going to the source control explorer, selecting the smproj file (which was checked out for editing), and checked it in by itself. Then, I checked in the Model.bim. Was able to do both of these things without getting the error.
I also tried all the usual things, deleting the entire solution directory, getting it from TFS again but nothing worked.
Noticed the version of Visual Studio 2019 was a few months old so upgraded to the latest. That fixed it!

Removing soltuion items from TFS2010 and "action caused a check out of the file(s)..." message

My solution structure looks something like this:
MySolution
FirstProject
SecondProject
SolutionFolder1
SolutionFolder2
SolutionItem1.txt
SolutionItem2.txt
Then there are two workspaces with
this solution at the same version
used by two users on different
computers.
A solution item is removed in the first workspace and the change is checked in into TFS.
In the second workspace the latest version is get from the TFS (the workspace is without local modifications and no files are checked out). Visual Studio displays this message:
Your action caused a check out of the
file(s) C:\MySolution \MySolution.sln,
and a new version from source control
has been loaded in the development
environment.
Now, there are two items in pending changes in the second workspace: solution file is checked out and the solution item is deleted. After undoing these changes and getting latest version, they appear again. These conflicts are resolved only during checkin which is a little bit confusing.
Is there a way how to get rid of this TFS oddity? Thanks.
I cannot find any answer but there is a workaround. Solution probably is not the best place to store complex folder hierarchies with a lot of files. When these folders and files are moved to own VS project then everything works well.

VSeWSS phantom feature can't be deleted

After doing a subversion merge with a co-worker, my VSeWSS project no longer build correctly. It creates two features for a single webpart feature (before the merge, this didn't happen). If the name of the feature is "MyFeature', VSeWSS always creates a second folder called 'MyFeature_2' and adds it to the solution manifest.
I've tried deleting everything I know to delete: pkg/MyFeature_2, the entry from pkg/manifest.xml, and the incorrect feature id in pkg/solution.xml (which gets generated every time I build the wsp). I've deleted bin/Debug/solution. After that, I have no idea where VSeWSS is getting information telling it to add a second feature.
I've also tried completely removing that feature and re-adding it from scratch, but the same behavior persists. In the WSP view, the 'delete feature' button is enabled for the "true" feature, but disabled for the generated one. however, if I try to delete the true one, it fails and reports a permission error on pkg/MyFeature/.svn/all-wcprops.
Grr.
By default the /pkg directory isn't part of your Visual Studio project. So it doesn't get added to source control. You need to add this as it contains the GUID's for features and if you don't have it you'll find VSeWSS will silently create new GUID's and populate /pkg for you.
Regards,
Paul
It turns out that during the SVN merge, the pkg/MyFeature/feature.xml file got jacked up. A FeatureID was no longer specified, so every time it tried to rebuild, VSeWSS generated a FeatureID for it, which caused it to try and build out the entire feature again, but the folder that existed in the filesystem was in conflict with it. Once I restored the feature.xml for MyFeature, this problem was resolved. Now my problem is that I can't seem to get the package built - there may be a problem retracting the old solution, but that's something different.

Resources