Why is TFS not updating my project? - tfs

We have an ASP.Net MVC Core project solution in TFS.
And there is an error icon at the top of the solution explorer that says "Package restore failed".
And if I open up the project.json I see the red sqigglies:
"The dependency ... could not be resolved" for several dependencies.
The developer who created this error has since fixed it. And all the other developers on the team get latest and the error goes away.
But it won't go away for me.
I get latest and the error icon at the top of the solution explorer and the errors within the project.json are still there.
I blew away the folder, got latest from Team Explorer, and the errors are still there while gone for the other errors.
Anyone know why this is happening?
I'm stumped. I don't understand what is happening.

First, you could try to do a force update for the specific error fixed changeset.
To force a update, use the "Get Specific Version" command with the
"Overwrite all... " option checked.
You could also clear TFS and VS cache, delete old workspace(back up changes first), create a new one, then do a fresh getting latest files from TFS source control. Which should do the trick.
If the issue still exist, you will have to check your local environment if you are missing some thing. Do a simply compare of the environment with other developers on the team.

It turns out this was a combination of the way .Net Core stores nugget packages and of being in a government environment.
We log into our computer with one account that does not have admin priveledges and this is the one I develop with in order to connect to TFS. But there seems to be a lock on the users folder for this account. So when I start up the solution and project.json tries to resolve all the packages, if one is missing it can't download it and put it in that folder. I then have to start Visual Studio as an Admin and open the project. Then the missing package is downloaded to the nugget package folder under my Admin user's folder. Then I read the resolution failure output at the top of the solution explorer next the the red circle with the X in it to see which package is missing and copy it over. It may be more than one so you have to close VS open back up as the non admin account and look for the next one that fails.

Related

TFS: Force update does not work

My objective is to get the files in the TFS into my local computer.
The computer I am using has previously been used by someone else, which I assume is the root of my problem.
I connect to the server, and in Source Control Explorer I find the folder that I want to download. I right click it, and a popup with the following pops up:
Source Control Explorer
All files are up to date.
No files were updated because the requested file versions were previously downloaded.
To force an update, use the "Get Specific Version" command with the "Overwrite all..." option checked.
Ok, so I do this, as is also suggested in this question on StackOverflow. It gives exactly the same result. I tried all different combinations of checking and unchecking the boxes.
I also tried to delete the workspace, and cleared the caches for Visual Studio and Team Foundation.
What should I do?
Problem solved.
I was not yet added to my team on the Team Foundation site.
Wierd that I could still see all the code.

TFS doesn't show the solution

I have a problem with TFS
when I connect to a team project and configure workspace and click on Map & Get button, it shows "successfully mapped" message but there is no solution in Solutions panel, there is just a text "there were no solution found"
And when I try to get latest version or get specific version in source control explorer,it shows a message that says "all files are up to date, no file were updated because the requested file versions were previously downloaded" but there is no solution and project in mapped folder
I don't have this problem with other team projects
Does somebody know what's the reason?and what can I do to solve it?
Thanks
Edit
when I click on "map & get" for the first time,as usual a dialog box with title "calculating items to download" appears and then another dialog box with title "get", but in the second dialog box the green progress bar doesn't fill and then the message "workspace successfully mapped" appears in team explorer home and as I said before, there is no solution
To narrow down your issue, you can try below methods:
Make sure your local mapping folder is on a hard disk with enough
space.
Try to Removing the mapping of the project(Right Click your
project→Advanced→Remove mapping) and remap to another folder.
Clear TFS cache and VS cache
According to your above message
In source control explorer under "server-name/DefaultCollection" node
there is nothing
I was wondering whether there is a solution with the project in TFS.
Try to map the project on another computer with another account.
Try to make sure you have enough permissions to get the project.
Check whether you select the right project collection which including
the project.
Check whether your solution and files are in the excluded list of
pending changes.
Probably you deleted the files after you did a Get Latest Version operation.
Try to use the Get Specific Version then check the "Overwrite all files even if the local version matches the specified version".
I finally find the problem. It was related to my access level in team project.
I was the 7th member of the team and because in this free version a team can only have 5 basic and advanced members, automatically my access level was changed to stackholder and as you know a stackholder access level has some limitations.

TFS checkin error VS2013 - The process cannot access the file

Consistently getting a checkin error via VS2013 for a MVC project. Have been spending quite some time but still dont get whats happening.
The project is cleaned. Checked that Application Experience is set to automatic. I am running on Windows 7
Any help ?
There is a file in your solution that does not exist on disk. Maybe it was deleted manually. If you know the file you can go looking for where it is referenced in your project hierarchy. It should be listed with a yellow triangle.
Either remove it or replace it.
If you don't have a local copy but it is still on the server you can find it in the Sourfe Explorer and do a Get Specific | Latest to recreate it.

TFS mapping gone in solution explorer, but listed correct at Team Explorer

I have a team project that I was working on, but today I opened Visual Studio 2013 (update 2) and my solution, just to see that TFS options (check in, get latest menu options, along with the lock and + signs next to files) are gone. The solution is just like a local solution. I haven't done anything. When I go to team options, I can see that it is mapped to the correct path and I'm on the correct workspace. I've removed the mapping, deleted the solution locally (I didn't have any pending changes) and remapped the solution from TFS. Got the latest version but still no mapping in solution explorer. Restarted Visual Studio many times (obviously), but no avail. I can get the latest from team explorer though. What could be the cause and how can I solve this problem?
You need to open "File | Source Control | Change Bindings". If the files are in the correct folder you should see a bunch of red squiggles under the mappings.
Unbind all of the projects and the solution
Rebind all of the projects and the solution
That should solve the issue.
You might have lost the solution bindings
Try to re bind to source control. Also check you are in the correct workspace in both places and that you are correctly mapped.
Your top source location is mapped into your local folder, check that and remove if that is mapped to the local folder.
Right Click -> Advanced -> Remove Mapping
I ended up going to Control Panel -> User Accounts -> Credential Manager and removing several references to a service account that some how became associated with my work space over the weekend. No idea why that happened but removing those associations and restarting visual studio resolved the issue.
The issues I experienced because of this issue are:
"Out of memory" alert when launching an existing solution that has always worked just fine.
When "getting latest" on a solution, I would receive an error about our service account not having sufficient permissions to perform the action on my own work space.

Visual Studio 2013, TFS is very slow

When I originally installed VS Ultimate 2013 everything was fine but for the last month or so it's been a dog.
The source control explore in my Visual Studio 2013 install is very slow. Just clicking on a node and the act of displaying the node contents takes 20+ seconds.
Everyone else on the team is ok so it's not the TFS server it's just my install.
I assumed it was some addin I'd installed into VS so disabled them but no luck.
Any ideas?
Having tried all suggestions, unloaded all add ons, tried to reinstall VS, removed all extra workspaces etc. the answer to my problem was to unmap my workspace and then remap it.
Problem solved. Not got a clue what the underlying fault was.
In my case, the only way to get rid of the lag was to change my workspace location from "local" to server. You can do this under the advanced options for your workspace.
The 'full blast' solution that worked for me was;
remove workspace
delete all source code
rebuild the workspace
rebuild solution
Only takes a few minutes more than just rebuilding the workspace (see #DaveF's answer) but gave me a bit more confidence that everything hangs together.
Had this happen to me a few times now, so there are some things I'd like to add to the accepted answer.
I work in a place where we have a lot of VS solutions with a lot of files in them. Microsoft's guidelines suggest that you shouldn't be using a local workspace if its going to have more than 100,000 items in it. So you could prevent this problem entirely by:
Not using local workspaces
Making sure never to map enough folders into a single workspace that it gets over 100,000 files associated with it.
Periodically declaring "TFS bankruptcy" and unmapping everything.
For me, the drawback of having to use strict locking and not having offline access makes #1 unacceptable. I'm going to try harder to do #2, but honestly #3 is what I've been living by.
Its kind of like early Windows, where every year or so you had to just reinstall the OS to remove all the accumulated cruft.
Cleaning local folders helped: See 'Team Explorer - Pending Changes', under 'Excluded Changes' it said: 'Detected: 50000 add(s)'. Click it to see path to folders.
This make me crazy too for over six months until I found this instruction. Now, my VSO is fling. Note: this information I copy from somebody. Would like to give them credit but I cannot remember how did I find this.
You can fix this problem of TFS by editing registry.
Navigate to key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Proxy
and then change value of URL to any dummy website like 'www.abcdummy.com'
Restart VS after editing registry key value.
I had the same problem, it kept me busy for a week or so, but after investigating my complete setup i found the following:
Within my ASP.NET application, i had an image directory and an image cache directory, with lots of images in them. (+200.000). Both were not included in my VS project, but still Visual Studio / TFS tripped over this.
First i found, that when checking in some files (which took over 10 minutes when the problem existed), in 'Team Explorer - Pending Changes', under 'Excluded Changes' it said: 'Detected: 50000 add(s)'.
Trying to get rid of this the 'normal way', by opening that 'Promote Candidate Changes' window and setting these files to be ignored, still didn't do much.
But after moving those image directories to some other location, outside my project, all problems disappeared.
Of course i had to add those moved directories as virtual directories to still see my images.
I cleaned my workspace of unnecessary projects and it ran better. I think vh_click is on to something with the 50,000 ads thing. TFS keeps track of all your edits and over time with tons of projects, undos, and craziness you could amasse a large set of which TFS has to chug. Get out the Clorox, the Comet or whatever else you clean with and dump some junk or move it to some archive folder or backup drive.
Cleaning up the Workspace was the solution for me, when opening visual studio 2015 the Source Control Window will remain in a Loading phase, I had 2 workspaces name and name_1 and I removed both.
No need to delete the entire folder, though , keep in mind that if you do delete the workspace and have the files, you will need to force the get latest to be on the safe side
Getting Latest was soooooo slow. I was using a Colleagues PC and had deleted his Workspace.
After an hour waiting to get latest I got an error and realised my User Account didn't have Full Control on the folder, giving Write Access made Get Latest run x1000 faster:
Just to throw another solution in the mix! I had the same problem which seemed to be caused by several layers of working folders configured in my workspace (some overlapping ones too).
The issue was resolved by going to Manage Workspaces, then Edit and then removing the additional folder bindings.
in short "Run it as an administrator".
No one of those solution does work at all, I even search on this link:
Why is Visual Studio 2013 very slow?
In vain, just do this ONE simple step:
Go to your visual studio path, usually installed on this path:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE namely the file "devenv.exe" , then right click on it, click "Run an administrator" ===> then open your visual studio project.
So, you can just send a shortcut of "devenv.exe" to the desktop to easily run it as an administrator each time.
Have ^_^ Fun
You can keep workspace on local and change your workspace to this. I did that and my TFS speed was great :
1- Remove all mapped folders in workspace "Edit":
2- Change workspace folder to parent all of mapped folders:
I hope it is useful for you.

Resources