In option, data retrieval is set to 10 min but P4VS never updates any file automatically. Only way to update a file is to first know which file has been changed by someone else and then do forced "Get Revision". One would assume that P4VS will update files at least when VS is launched.
Upon further investigation, when the workspace is viewed in P4V, those files are also not updated even though the depot contains updated files. P4sync in P4V workspace does not refresh any files. In fact the workspace in P4V contains files in the same state as existed on the day the workspace was created.
What is missing?
Related
I have a bunch of Word files in VS2015 solution. These files had ben modified by end user and I am trying to update them in TFS source control. What I did was I checked them out in my solution and copied user copies into solution folder in Windows10 File Explorer. I was hoping that the pending changes would include new files copies. However, when I checked them in I had a TFS message reading there were no changes done in those files. Am I missing something? Please, help if you can. Thank you.
Possible duplicate with this question How to have TFS 2010 detect changes done to files outside of Visual Studio?
The best solution is using reconcile in TFS. After you compare a server folder and a local folder, you can reconcile the differences between the folder contents and between files that have conflicting pending changes in your local folder. Detail steps as below:
Open the Source Control Explorer
Right-click on the folder with the changes and choose Compare
Select the files you want to reconcile (press CTRL+A to select all files)
Click on the Reconcile button
Set the options in the Reconcile Folder Differences dialog. Make sure Files that do not have pending changes is set to Check
Out
Click OK
If you have local changes the Check Out dialog will be shown. Set the preferred Lock type
Click Check Out
Let's understand the problem:
For our ASP.NET project using Visual Studio 2013 premium on a Windows 7 x64
On developer A's machine:
We've got a TFS setup
We added a new file A in the project
We checked-in the newly created file in the TFS source control
On developer B's machine:
We've got the same TFS setup
We forcefully took the latest (by specific option - overwrite option) version
File A gets loaded in the project, however it stays excluded
Developer B manually includes the file in the project
The files are well included and that is our concern. Why files which're included are getting excluded on other devs' machines?
The newly added files gets loaded on dev B's machine however they doesn't show up in the solution tree. We've to manually include them in the project after show all files
There's only one mapping on each dev's machine. The code is going to locally mapped workspace only
We've a little big team, so for every developer. It happens every time we take the latest version.
How do we suppress this behaviour? Is there a setting as such?
We've tried searching the web, couldn't find a solution.
It seems TFS automatically excluded the changes. You may encounter such a situation as below:
They're not loaded in your current solution, so Team Explorer assumes they're made as part of either a different solution and
that you don't want to check them in together with the changes that
do match the context you're in.
They're made in a different workspace, again Team explorer assumes you want to check in groups of files that logically make sense.
More detail info please refer the very detailed answer from jessehouwing in this question What are "Excluded Changes" in Team Foundation Server?
And if you are working with a little big team, the way you are using to "forcefully" take latest is not a recommend solution. Suggest you to still use get latest to download the files on the TFS server. Even though you may not obtain the "really latest version" of the file. You can still work on it and figure out the conflicts if there are during the check in action.
Update
If develop A has checked in the files, but not checked in the project file( .csproj file), then TFS will not download them if you execute a "Get Latest" by right clicking on the project or solution in Solution Explorer.
You will however get the files downloaded correctly if you right click and "Get Latest" on the folder in the source control window. But, they won't get loaded into your solution, because you haven't told TFS that they belong there.
Steps I made leading up to this problem:
I created a project in Visual Studio Online (TFS) and checked in the entire contents (about 200mb) of a folder called classic.
I created another project and checked in the entire contents of a folder called dlls.
I decided that it would make more sense if these two folders were apart of the same project, so I deleted both of the ones I created in steps 1 and 2.
I created a new project and mapped it to a folder on my computer that contains both the classic and dlls folders.
In Visual Studio 2013, I go into "Source Control Explorer", right click and select "add existing item", and try to add both folders.
In this prompt, none of the files that I need to add are shown! The prompt gives me a message at the top that says "Files already in version control are hidden". If I click through each folder they are blank except for other folders. I verified that the files are still there on my local machine.
The problem is, I deleted those 2 projects in TFS that had the files. Do those projects still exists somewhere? How do I completely get rid of them? Where can I find those files at if they are "already in version control"?
This may be happening because even though you deleted the files from the server, you local workspace still thinks they are available on the server. The easiest way to recover is if you can delete your workspace and recreate it. Be careful not to delete your local files without creating a backup.
I use VS 2013 to check-in a file to TFS 2012 and get the following error:
The item $/MyTeamProject/MyProject/MyInterface/IAllocationBLL.cs does not exist at the specified version, or you do not have permission to access it.
Other files just work fine. I notice that the Last Check-in date is missing.
If I undo this file, it then disappears on TFS. When I edit this file again, it back to TFS and still missing Last Check-in. I still get the same error checking in this file. Any advice would be appreciated.
The best method is to save the file as a backup outside, and undo it, check in the whole project, then add the file to the project again.
I had same/similar issue today. Didn't found proper (or easy) solution online, and here is my workaround:
(Optional) Backup project just in case
Delete file locally
In Source Control Explorer undo changes (was delete because, auto generated files are always deleted then generated again, and i think this is just bug in studio). Ignore warnings. You will have now source controlled file with exclamation because file not exist.
Open designer and just move some table and save - that will generate all files again without updating model from database.
VOILA - your file is under source control again.
I received this error with Visual Studio 2019 and was able to resolve it by:
Backup your project, just in case. You shouldn't need it though.
Undo the changes for everything in the project in the Team Explorer.
Go to the Source Control Explorer, Right Click the Project, and click Add Items To Folder.
Select all the items in the project folder. Click Finish
Items should reappear to check-in. Click Check-in and it should work.
We are using TFS 2010 and facing a problem with deleting a folder inside of a solution in Visual Studio.
In the latest version of checked-in code, the directory in question has files in it.
One of the developers decided to move the files in that directory to another location within the solution. He then tried to delete the old folder but go the following error:
This operation cannot be completed.
You are attempting to remove or delete a source-controlled item where the item is either exclusively locked elsewhere or otherwise unable to be deleted from source control.
Does anyone know what the problem is with trying to do this and is there a way to get around it?
You cannot delete a folder that has pending changes on any of its children (including if any of those children are being moved out of the folder - they're still children until that changeset is checked in.)
You'll have to do this in two steps: first, move the children out of the folder and check those changes in, then delete the folder as a separate changeset.
If the folder you want to delete exists on your local machine, just add a new file to the folder from within the Visual Studio IDE (it doesn't matter what type of file). Then you should be able to delete the folder from within VS.
If the folder was deleted from your local machine, create a new one with the same name and then follow the above steps.