I was using TFS fine with Visual Studio 2013. I've switched recently to VS 2015 and have an annoying issue (bug ?).
I have a bunch of excluded pending changes that I do not want to commit but that I want to keep locally (bad dev environment, don't ask).
My issue is that everytime I re-open VS 2015, all excluded changes are back into the included changes and I have to manually re-exclude all the stuff I do not want to be committed.
If I open VS 2013, included/excluded changes are still in the perfect state !
Anyone knows what is causing VS 2015 to be such a mess ?
I just tested this under Visual Studio2015 Update2 and TFS2015 Update3 with about 300 files in excluded list. Everything works prefect.
It's may related to the your VS. First shelveset your excluded list and try to clear TFS and VS cache. Then just unshelveset the files and adding them back to excluded list again. If it's still not work, try to uninstall and reinstall your VS.
I had this problem with Visual Studio 2013. To fix it, all I did was:
Make sure all my intended changes were shelved
Undo all pending changes
Close Visual Studio
Wipe out the TFS cache at C:\Users\Username\AppData\Local\Microsoft\Team
Foundation\5.0\Cache (where Username is your Windows login username)
Reopen Visual Studio
Unshelved my previous changes back to my workspace
Voila! No more extraneous files showing up in my Excluded Changes list!
Related
When I open Visual Studio and attempt to connect to TFS, I get the following error message:
Error
Unexpected end of file.
I've found a handful of places online (like here and here) where people have run into similar situations but clearing the Team Foundation cache as recommended doesn't solve the issue.
I even completely uninstalled Visual Studio Enterprise 2015 and installed Visual Studio Enterprise 2017 and still get the same error.
I recently created a new TFS instance on another server for testing out some automated build features without messing with our current setup and can connect to the new TFS instance just fine.
What would cause this error?
First you could use another machine with VS installed to connect the same TFS under your account. This will narrow down if the issue only occurs on your local machine or not.
You could try to clear both TFS and VS cache issue.(You may not uninstalled the previous VS clearly).
For TFS cache:
close all instances of Visual Studio on the client machine,
manually delete the corresponding Tfs client cache folder, and then
start Visual Studio
The corresponding Tfs folders to manually delete are as follows:
Tfs 2017: "%localappdata%\Microsoft\Team Foundation\7.0\Cache\"
Tfs 2015: "%localappdata%\Microsoft\Team Foundation\6.0\Cache\"
For VS cache:
Delete the contents from the following folders
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VisualStudio
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VSCommon
Moreover, also give a try with removing the tfs related credentials from Credential Manager, close all Visual Studio instances, deleting %LOCALAPPDATA%\.IdentityService, use another user account connect to the TFS server.
Update: Op ended up doing an OS reload and haven't had any issues since.
I ended up doing a full OS reload
It was likely overkill as I'm convinced there was a cached file somewhere I couldn't locate that was holding those settings but I didn't have the extra time to fiddle with it and I needed to move to Windows 10 at some point anyway.
I'd venture to guess #PatrickLu-MSFT's answer will work for most people but for whatever reason it didn't for me.
In my case I closed Visual Studio 2017, went to the solution's directory and deleted the .vssscc file.
The file was then regenerated and the problem was solved.
I am getting the aforementioned error most times I unshelve from Team Explorer > Shelveset Details, but unlike this question, I have my workspace set correctly under my Pending Changes window. The weird part is that I am always able to unshelve after trying a second time without changing anything.
It didn't always do this to me, and it seems to not affect anybody else on my team. I've not messed with any settings that I can think of as being relevant either.
And yes, I've restarted my computer since it started happening.
Another thing it does is deletes all ADD changes upon reconciling after passing a gated check-in build.
Thanks.
Using VS 2015 Update 3 (version 14.0.25431.01) connected to TFS 2015 (version 14.102.25423.0)
According to your description:" it seems to not affect anybody else on my team". The issue should be a client side issue.
First,you could use another TFS account to unshelve Shelvesets on your develop machine. This will narrow down if the issue related your account or not.
Suggest you try to clear TFS and VS cache:
For TFS cache:
close all instances of Visual Studio on the client machine,
manually delete the corresponding Tfs client cache folder, and then
start Visual Studio
The corresponding Tfs folders to manually delete are as follows:
Tfs 2015: "%localappdata%\Microsoft\Team Foundation\6.0\Cache\"
For VS cache:
Delete the contents from the following folders
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VisualStudio
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VSCommon
If above not work, you could also delete the old workspace(back up local changes first), and create a new one. Then test it again, which should do the trick.
It turns out that opening the shelfset before changing my workspace from pending changes causes the issue. The solution is the change the workspace in pending changes before opening the shelfset.
I'd definitely call this a bug in VS since the shelfset viewer does not indicate which workspace it is referencing before unshelving.
I had about 20 files pending changes in my solution in Visual Studio 2015,I had a problem with repository so clicked on "Undo pending changes" thought I had already had shelved my changes. After undoing pending changes I noticed that I hadn't created any shelveset of those change.
I googled a bit about it and I found this link How can I get my changes back after clicking “Undo pending changes…” in Visual Studio 2013 and TFS
I tried the solution mentioned in answers of link above but there is no TFSTemp folder in my AppData\Local\Temp folder do notice that I'm using Visual Studio 2015 but the user asked this question is using Visual Studio 2013. Maybe vs 2015 store TFSTemp in different location but where ???
Any Idea about how I can get my changes back???
Any help would be greatly appreciated
The TFS Temp folder should be the same path "AppData\Local\Temp\TFSTemp". It's not related to VS version. If you could not find it in your own account, give a try with Admin account (If the VS run in Admin mode)
You should be checking in frequently or setup some sort of backup system to avoid mistakes like this. If the files are gone from your file system, they're gone. Maybe a file recovery utility could do the trick, but the solution is too complicated. Besides past that, there's no way to get them back.
I've been working with several projects I have hosted on GitHub, but recently I haven't been able to check in any changes. Every time I save a file, VS treats the file as if it's checked in, lock icon and all. I can't make any commits because of this. I've had this occur in VS2013 Community, VS2013 Pro, and VS2015 Ultimate CTP. While restarting VS works in the 2013 versions, it does not work in 2015.
While searching for an answer, I came across this SO question. The answer did not work for me, as I am using GitHub, not TFS with a Git project ("Connect To" wouldn't show my project). In addition, I have not renamed any of the projects that have had this glitch. Is there anything I can do besides report the bug to MS?
To all the people which have this kind of problem using Visual Studios Git Source control.
One solution which worked for me since all other i found failed was to create a .gitignore file via Visual Studio. This somehow stopped the automatic check in which happened during a filesave.
Team Explorer -> Settings -> Repository Settings -> Ignore & Attributes section -> Ignore File -> Add
I am currently using Visual Studio 2015 update 1.
I am working on visual studio 2010.
I have done some changes in files and then I have closed the visual studio.
But now I want to restore the project, means I want to undo the previous changes.
lets say first version is version1 after changes this it becomes version2. I save these changes and close the visual studio. now I want version1 instead of version2.
So is there any way to restore the project in visual studio or on the basis of history I can get the the old project.
Please help me how can I solve this issue.
Unless your code in under version control: nope, there is not!
It's too late now, but setting up a git repository on your local machine is very easy (see this SO answer) and will save you that kind of problems in the future.