I'm having problems with TFS when adding new files or folders to my solution.
When any other people in the team try to "get latest" it updates every changed file but it doesn't download the new added files!!
If we go to the Source Control explorer, the new files appear as "not downloaded"... and if we force it to download, then we have to include the file in the project in his machine too.
I can't believe this is the normal behavior for TFS (I think this is basic) so I assume we are doing something wrong... Any idea of what's happening??
Thanks in advance ;-)
Have you also checked in the project file to which the added files are related? In Solution Explorer these files will only be available if they are also in the local project file. Also check if the user attempting to download has the project file checked out already.
Update:
From within Solution Explorer you'll only get what's required for the referenced files in the .proj file. For Source Control Explorer yes it should get those files if you've never downloaded them before. Best way to be sure is rather than just do Get Latest (which tries to sync what it understands server side about your local workspace with the server) do a Get Specific Version -> Latest Version. This way you can "force" download of all project files irrespective of existing workspace status.
The hint above did not help in my scenario.
What did do the trick was to check out an old version (with the two overwrite-checkboxes) and get the latest version afterwards (also with the two overwrite-checkboxes).
This is a huge bug in TFS IMO.
I just had the same problem. My co-worker created a new file (with content, not just an empty file). He did a check-in, and everything went well on his end. But the file never got downloaded to my project. I could go into Source control explorer and navigate to the file in question, then do a "get latest version" or "get specific version" on it, but it still didn't appear in my project.
Then my co-worker did some cosmetic changes to the file and did another commit. This time, when I did a simple "get latest version" on the whole project, the file downloaded without a problem.
Check the most voted answer in this thread. This should be the nearest to what you are looking for
Find unadded files in Team Foundation Server
Related
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!
Oddly, source control seems to be holding onto files & projects even though I have deleted the artifacts from the Visual Studio Solution (itself). The GetLatest brings down the correct files (even when I delete the underlying artifacts from my workspace by hand). I have never seen this behavior in other servers...in fact...not even my PERSONAL Visual Studio Online behaves this way.
Now...to delete files...I have to delete things twice: once in the solution & once in TFS.
MY QUESTIONS:
Why is TFS holding onto the files in Source Control?
Is this a setting?
How do we fix this?
This is an internal TFS server & I am not the administrator. They are "new" so I am sure I will have to explain the issue at-length.
FOR EXAMPLE:
It's a normal phenomenon. Team Foundation Server uses your workspace to keep track of what files you have downloaded and what version you have of them. The reason it does this is so that it can maintain your files without a costly sync step. With TFS, when you say "Get latest", you only get the latest version of files that have changed since you last got them.
If you delete a file on the server and check that delete in, then when somebody does a "Get Latest", the file is deleted on their local system as well. It's for keeping the local file system in sync with the servers.
If you want to just delete the folder and files locally, there are two way to achieve it, more detail info please refer the answers in below question:Delete Local Folder in TFS
I'm using TFS for synchronizing my works with my partner on out project. But I have many problems with this. When my partner added some new files to the project and I want to have this files is my local version.
At first I tried to get it by right-click on project in solution explorer and selecting "Get Latest Version". But this method did not get the new files.
Then I went to Source Control and selected all the files and folders in project and pressed "Get Latest Version". The new files downloaded, but it seems that files are not a part of the project. They are just downloaded, but the don't appear in solution explorer near other file.
What is the problem here? Thanks.
Is your solution and project files bound to Source control in TFS? That is one of the things I can come up with with your description.
Those files may be added after mapping is done I think. Also, as #James Reed suggested, those files may not be checked-in.
If those are not the cases, I recommend a "Remove Mapping" and "Mapping" again.
Hope this helps.
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.
In showing a colleague how to use SVN yesterday, we created a test folder and file within our existing Visual Studio Solution. We'll call it "Test" folder with two files, "Test.ascx" and "Test.ascx.cs". We added it (or Visual SVN added it, 'cos it's awesome), and committed it. We also added and committed other files elsewhere in the project.
We can see it in the repository (and the other files).
Doing an update on my own machine to pull down these new files resulted in the other files being pulled down correctly, BUT the Test folder does not appear. No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
Where am I going wrong?
This is a known problem.
You can use
$ svn update --depth=infinity
to force the update. With TortoiseSVN, use the "Update to revision" command in the Submenu, then change the depth combobox to "fully recursive".
I've had ghost errors like this before and found the easiest work around is to delete the parent folder and update it's parent:
Project Root
Project
NewFolder
Delete Project, then Update Project Root
We can see it in the repository (and the other files).
...
No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
So you can or cannot see it in the repository browser?
Did you commit and update the parent folder of your Test folder?
I don't know, svn is always telling me to clean, did you try that?
It's not an answer, I know, but I have tried all the solutions you guys have kindly suggested and I just end up with conflicts, crashed TortoiseSVN and built up Karma. Therefore, a trusty edit in the .svn/entries file sorted it.
I have until now been a single developer using SVN just to manage my source code. Other people don't have problems, and I just check in stuff. I use Visual SVN as a layer to frig SVN for .NET (which it isn't great with) and I seem to constantly run into issues. I am performing very simple operations, not even branching/tagging. Simple simple simple. And yet I have issues with it?