When I get latest version of any project in TFS, all the changes (mainly the packages) are going to detected changes. What should I do after seeing them? Promoting them goes to included changes in TFS and ignoring them gets them ignored while building the solution. Deleting them from disk deletes them completely.
What should I do for getting the latest version without all this complexity?
First you should understand what's the detected changes, and the difference between changes and detected changes.
While edits in a local workspace can be pended implicitly just by
editing the file, adds and deletes still must be explicitly pended.
However, TFS version control’s workspace scanner also detects new
files which are ‘candidates’ for addition, and missing files and
folders which are candidates for deletion. The Team Explorer’s
Pending Changes Page has a link which shows the number of detected
adds and deletes, and provides a link to the Promote Candidate Changes
dialog which can be used to pend ‘real’ adds or deletes on these
items. This is called “promoting” the candidate adds and/or deletes –
because they become real pending changes.
Source Link: Server workspaces vs. local workspaces
In your case, you could just keep the detected changes. Since the most of the detected changes are packages folder, you could also follow Daniel's suggestion use tfignore file to ignore those files. As a result:
When you add ignored files to folders that are mapped in a local
workspace, they do not appear in the Pending Changes page in Team
Explorer.
When you try to add ignored files using the Add to Source Control
dialog box (for example by dragging them into Source Control
Explorer), they automatically appear in the Excluded items tab.
How to create a .tfignore file, you could follow my answer in this question: Visual Studio 2015 TFS .tfignore file
Related
VS2019 with the most recent update... Version: 16.2.5
Main error: TF402484 The personnel team project has been deleted
Also : TF10175 The personel team project does not exist.
As far as I understand so far, TFS new name seams to be "Azure DevOps". Some error say TFS while others "Azure DevOps" but it sounds like it is the same.
It got many errors in many projects (into at least 4 different solutions):
There is 3 to 4 kind of different dialog box errors, depending on where and what action I do related to TFS. All errors are about TF402484 error. The error is about a deleted project which nobody has deleted. Most of the time or always, the project has never been part of the solution.
I did not do anything else than updating my VS2019 to the most recent version.
I red: Visual studio 2013 team project has been deleted
About suggestion from previous link: "Undo any pending changes", yes it could seems to temporarily fix the bug BUT there is something that happen that put me in this situation, that seems to happen very often, intermitently and that's very anoying.
In fact, why do I have many items from other projects (not in my current solution) that appear in the Pending Changes window of my current solution?
Starting Source Control Explorer give me many TF402484 DlgBox error (at least 4) and it show "Working..." and stay like that forever. IT just freeze.
Also, I'm using many instances of VS2019 open at the same time. Could it cause the error?
What's going wrong??? What do I have to turn on/off or set, in order to prevent this behavior which is going to kill me in a near future?
Also, perhaps there is no connection, but the only other thing that also changed on my machine: I'm using Cobian Backup to do my backup and perhaps it touches (changes file time) to all or somes solution files.
The error the Undo any pending changes to that project or branches from that project in your local workspace. indicate clearly. You could give a try with below two ways:
Delete the workspace and created a new one, then check it again.
Team Explorer Home --> Under Solution --> Click the arrow down
behind workspace --> Manage Workspaces... --> Select the specific
workspace then Remove
Note: This will remove all your local mappings. Therefore you should check in all changes before deleting it. or back up
Look at Excluded Changes section under Pending Changes and check
if there are any files which belong to a deleted folder/deleted project. If yes,
right click at the file name and choose Undo.
Besides, you could try to clear TFS cache, which may do the trick.
Also reference this similar thread :
Visual Studio TFS: TF10175 During Add Solution To Source Control in
Visual Studio How To Fix
TF10175: The team project does not exists
One thing that drives me crazy with TFS is the fact that if you have a file checked out, but you made no changes to it, it still shows as a change, distracting you from real changes that you made. This is especially annoying when you use tools such as T4 to generate code, because most of the time the tool will generate the same code, but will leave the file checked out.
For some reason that I can't understand, Visual Studio insists in showing those as changes, and will even claim that there are conflicts if another person happened to check-in the same "changes".
Fortunately, the TFS Power Tools include a command that compares checked-out files with the server version and undoes the unchanged files. I will explain how to integrate it into Visual Studio using a custom tool.
This is unfortunately not available if you are using Visual Studio 2017!
It used to be very simple to accomplish this with earlier versions of Visual Studio:
tfpt uu /noget /r *
How do we remove files from pending changes if they do not have any changes?
This is different based upon your choice of version control system in TFS, so the above problem only exists for TFS' traditional version control system TFVC and not git which has been supported for a few years now.
For TFVS a partial workaround is to mark all files, right-click and Undo... and click Undo Changes button in the following dialog. This will prompt you for the files that are different (letting you choose No or No to All) but not for the ones that have no changes. Important: I write 'partial' because this approach does not work for file renames as the file is considered unchanged so the rename will be undone.
Yes,there are no Power Tools for Team Foundation Server 2017. You could use below workaround:
Right-click on your project ,select undo checkout, then just click okay, or whatever confirmation is left...
Then, while undoing checkout, for every file that has REAL changes in it, a prompt will ask you to confirm the check out for that file... simply click "No to All". Visual Studio will know if the checked out file has changes or none.
WARNING: This method also removes new files, i.e. files that are not yet checked in to TFS. If you want to keep these files then simply exclude them from the set of files you "undo".
You could also take a look at this question: his question Files listed as pending changes when doing merges that didn't change?
The TFSSourceControlExplorerExtension extension is available for VS 2017 and it has an undo unchanged action that works rather nicely.
Stage the change you actually want. The file that isn't actually changed then disappears.
I am using TFS to source control my c# ASP.NET MVC projects. I have a project called ProjectA, It has two branches (i.e ProjectA and ProjectA-Dev.) ProjectA is my production branch, and ProjectA-Dev is my development branch. ProjectA-Dev contains lots of new code for my project's upcoming release.
I am at a stage that I need to merge any change from production into dev. My production version received a few bug fixes while I was working on my next release in ProjectA-Dev. I want to merge the added bug fixes into my ProjectA-Dev branch.
To merge ProjectA into ProjectA-dev, I opened "Solution Control Explorer", right clicked on ProjectA then on "Branching and Merging" then on "Merge".
On the Source Control Merge Wizard I selected $/TFS/ProjectA in the source branch. I then selected $/TFS/ProjectA-Dev in the target branch. Then I hit "Next", selected "Latest Version", and hit "Finish".
The process runs for approximately 10 seconds and then it gives me this error
The error makes complete sense. However, what is puzzling me is that the node_modules directory does not exist on either branch. Also, I removed the folder node_modules from my local projects.
I should also note that node_modules used to be in TFS, but then I removed it from TFS few weeks ago using changeset 20000. But, today, in the latest version, the folder node_modules does not exist on TFS. I also validated the same thing via the web portal.
I tried to remove the TFS cache locally by deleting the content of this folder %localappdata%\Microsoft\Team Foundation\5.0\Cache but the issue still exists.
How can I bypass this error and correctly merge these changes?
I finally got it to work after running
tf destroy "$/MyPath/To/Project/node_module"
TFS might not know what you changed (deleted node_modules files) and if the change might be relevant to the branch during a long changesets in branch projectA.
You could find the specific changeset which you deleted the node_modules files first. Then just use tf merge command with /discard option.
/discard Does not perform the merge operation, but updates the merge
history to track that the merge occurred. This discards a changeset
from being used for a particular merge.
Sample command:
tf merge $/Project/SourceBranch $/Project/TargetBranch /discard /recursive /version:C56693~C56693
It discards changeset 56693. The version is a from ~ to, so you can discard multiple changesets at once. In your case discard the changeset till the specific changeset node_modules files deleted. When the command has finished, you still need to check in the merge.
After this just perform the normal merge action again.
We just implemented TFS in our company and I accidentaly included the bin and obj folders. I would like to exclude them. I searched on Google and found basically 2 ways to accomplish this:
1) https://msdn.microsoft.com/en-us/library/66tw9ezk(v=vs.90).aspx
In Visual Studio, open Solution Explorer and select the file to exclude.
On the File menu, click Source Control, then click Exclude from Source Control.
When you are ready to place the file under source control, you can access the File menu and click Source Control, then uncheck Exclude from Source Control.
In my File>Source Control, I don't see exclude from source control there or under advanced.
2) How do I permanently exclude the bin and obj folders from TFS 2012 checkin?
I tried adding a .tfignore and I couldn't find the 'ignore by extension', 'ignore file', etc. in teh Promote Candidate Changes dialog box. As far as I understand this is only applies to a local workspace and not a server workspace.
We set up the solution to checkout a file whenever it's altered, so when someone builds the project he acquires an exclusive lock on the dlls and then nobody else is able to compile.
After the steps Mike describes, you can go further and define an ignore rule. Undo the pending changes to the file you want to exclude and then click the "detected: 123" link that shows under "Excluded changes".
This open up a new window in which you can ignore these changes indefinitely. It does this by creating a .tfignore file and adding that to source control. The alternative to the UI is t create this file manually and checking it in. This should prevent Team Explorer from showing files that match the patterns in the ignore file.
Make sure that these files are deleted from source control, if they were checked in accidentally, you can destroy them to make sure they are truly gone. You'll need to do this from the commandline using tf destroy
The call to Destroy won't delete your local files when you use the remote itemspec to destroy them:
C:\>tf destroy /collection:http:
//jessehouwing:8080/tfs/DefaultCollection $/Scrum/test.txt.txt /noprompt
Destroyed: $/Scrum/test.txt.txt
C:\Program Files (x86)\Microsoft Visual Studio 14.0>dir "c:\Workspaces\Local\Scrum"
Volume in drive C has no label.
Volume Serial Number is 008A-AC5B
Directory of c:\users\jhouw\Source\Workspaces\Local\Scrum
12-08-2015 20:12 <DIR> .
12-08-2015 20:12 <DIR> ..
12-08-2015 20:12 0 test.txt.txt
1 File(s) 0 bytes
2 Dir(s) 297.229.512.704 bytes free
After performing a tf get /collection:http:
//jessehouwing:8080/tfs/DefaultCollection $/Scrum /recursive it will indeed be deleted. This should not be an issue if the files in question are regenerated during the next build.
See also:
https://stackoverflow.com/a/21260759/736079
If you're using a server workspace, the only way I can think of is to set a Forbidden Path checkin policy for your source control repo. It's a part of the Team Foundation Server Power Tools; you'd need to install the version of the power tools that matches your Visual Studio version on all developers' machines.
Note: these use Regular Expressions, so you'll need to adjust your pattern to match ;).
From my personal experience, the easiest way to achieve this is the following:
View -> Team Explorer (Ctrl+\, Ctrl+M)
Click on Pending Changes
In your Included Changes list, right click on the desired folder.
Click Exclude.
The excluded change should now appear in the Excluded Changes list below.
The following TFS error occurs using Visual Studio 2013 to interface to TFS (TFS apparently also carries the version of Visual Studio with it):
item has pending changes but does not exist locally
This seems very wrong, as one chief purpose of TFS is to give me items that do not exist locally.
Sometimes (but not always) this occurs after a delete, and the purpose is to restore / update the file from the server.
In the Solution Explorer:
right click on file that gives error=>Source Control=>Undo Pending Changes.
right click on file=>Add file to Source control.
Now you are good to go.
Not sure about this but have you checked out a different workspace? Try going to View->Other Windows->Source Control Explorer, then open the Workspace dropdown near the top of the screen, and select "Workspaces..
As it was suggested here, just undo this change, and download will start normally.
To explain what's going on: there are certain conditions on locally changed items (files and folders), and if they are not met, TFS can interrupt downloading sources from server. One of such conditions is that item which is regarded by TFS as locally changed (no matter if you intend to check-in it or added it to "Excluded changes") should actually exist.
For example, some local file was marked to be added to TFS, but not checked in. After that, it was locally deleted from disk. But local TFS still remembers about its existence. So the message tells you that TFS is unable to download new version if the information that this file should be added still exists.
Faced similar message with VS2017. However doing source control -> undo didn't work, it produced message "No pending changes were found for " and problem persisted.
Resolution:
- do "Check out for edit" on problematic file(s)
- source control -> undo
- get latest
Right click on the problematic file in Solution Explorer and click add item to source control.