Source Control Explorer Keeps refreshing and flickering with every change - visual-studio-2012

We have TFS 2012 update 3 on premises, I'm using VS 2012 update 3, the only extensions I have are TFS Power tools 2012.2 and VS Productivity Tools 11.0.60403.0.
With every change (check out for edit, delete, check-in) the Folders section (Treview on the left) of Source Control Explorer keeps refreshing and flickering.
I have 89572 files on my workspace and I always have more than one instance of VS open, so after reading this page I changed my workspace to server, but the problem did not stop.
In short, Source Control Explorer is driving me crazy, with every little change I have to wait something like 10 seconds until the flickering stops.
Does anybody has any suggestions on how to fix it?

MS is apparently aware of the issue and claims to be working on a fix.
http://www.beta.microsoft.com/VisualStudio/feedback/details/803702/source-control-explorer-left-hand-tree-flickers-and-locks-up-every-time-i-check-in-a-pending-change

I found a workaround that in my case worked.
After adding a new working folder to my workspace through File > Source Control > Advanced > Worspaces... > Edit... the problem was gone.
Maybe opening the workspace and press OK is enough.

Related

Visual Studio incredibly slow when renaming files

I have a medium-sized solution with 99 projects that has recently started behaving weirdly:
1) If I try to rename a file through the solution explorer, VS will seemingly hang, but after a long time (10+ minutes) it will complete the rename operation.
2) I also noticed today that switching to between Debug and Release mode seems to freeze VS as well. So far I haven't let it run long enough to see if that actually completes.
I've tried both Visual Studio 2012 and 2013, and both exhibit the same problem, so that seems to indicate the problem might not be with Visual Studio. I've tried to check in the event log if there's anything there, but nothing jumped out on me. I've also rebooted and run checkdisk, but it didn't find anything wrong.
Running Windows 7 Professional on a fairly high-specced laptop with 8GB RAM and a new SSD
Update: apparently if I have renamed a file once, I can keep renaming it (and other files in the solution) immediately. When I restart VS, it's slow again.
Update2: I left the computer running overnight to try to switch from Debug to Release, and it managed to do so in the 14ish hours between me leaving work and getting back here.
Visual Studio can be extremely slow in renaming files if you are using TFS with a "local" workspace as oppose to a "server" workspace, and the total number of files including different versions in the TFS repository exceeds 10,000 items.
Contrary to Microsoft's recommendation, I suggest using a server workspace instead of a local one for much better performance. There are also some other downsides to local workspaces and the only upside is being able to work while your TFS repository is down. That's not much of an upside considering if you can't connect to TFS, you probably can't connect to your LAN and there's darn little work you can do anyway in that situation.
To change to a server workspace for TFS in Visual Studio 2015,
In VS click on File --> Source Control --> Advanced --> Workspaces
In the dialog that opens, select your workspace and click Edit...
Click Advanced... (it does not matter which mapping is selected).
Under Location, select Server and then press OK.
Switching over to server may take ten minutes or more depending on the size of your repository.
Once this is done, renaming files should be nearly instantaneous.
When testing I'd made an attempt at setting up one of the projects to build on a different server, both in Debug and Release mode. I though I'd cleaned up both, but apparently I'd only done so under the Debug configuration.
Apparently meanwhile that server has decided it hates my machine, which makes my machine freeze while waiting for it.
Closing Visual Studio and manually editing the .csproj file solved the problem.
Unfortunately 99 projects is not a medium sized solution for Visual Studio but instead a very large solution. Visual Studio simply doesn't scale well to solutions of this size and you're seeing the effects of that here.
The only way to make this better is to factor out your solution into several smaller solutions.
Building on #Daniel Barbalace's answer, my issue indeed had to do with TFS, but I could not switch to server workspaces. What I ended up doing was removing the mappings to any branches or projects that I am not working on at the moment. There is no magic number but once I seemed to get under 50,000 files (globally for the TFS folder) renaming suddenly went down from 2+ minutes to 3-5 seconds.
In my case "git" cause that,i have a bunch of html files in my commics project,so,when i removed .git folder i have again fast renaming files.
I had the same issue. Renaming one file would take a decade. I found a solution however. When I first check out for edit, renaming becomes very fast again.

How can I completely remove TFS from VS2012?

I've tried out the online version of TFS from my MSDN subscription and didn't like it. I decided to use another provider of source control on the web.
Now I keep randomly getting the TFS explorer window popping up on loading solutions and error TF205020 about not being able to connect to TFS. I've gone into Tools, Options and removed the source control options, setting it to "None" (I'm using TortoiseSVN from Windows Explorer for check-ins).
When I create a new project, save it and open it again I get the error and the TFS windows, even after closing them. I've looked at the File menu to see if I can remove from source control but the menu option isn't there - presumably because the new project has not been checked in.
Any way to stop this?
I think you didn't remove your TFS server from VS servers list.
Go to Team->Connect to Team Foundation Server...->Connect->Servers... and remove your server from there.
Go to Tools -> Options -> Source Control
Change Current source control plug-in to None
You can now remove the TFS server.

Why won't my VS2012 recognize modified files on disk and reload?

I've been away from Windows and Visual Studio for a few years. Now I have VS2012, and I notice that it fails to recognize that a file has changed on disk (i.e. by a different editor). In fact, even if I hit the refresh button on the Solution Explorer window, it still doesn't reload the file. I can close the window and reopen it -- still no luck. I thought "gosh, I hope I don't have to close and reopen the solution each time!", but it turns out even THAT doesn't do the trick.
Its as if VS is caching old copies of files and cannot imagine that someone might use something other than VS to modify them.
These are just local files, no network issues involved. I must be missing an understanding of some major new "feature", yes?
--- Edit: -----
Ok, here's some progress. I've been using the VsVim extension to have a vim-compatible keymap. On a hunch, I disabled it, restarted VS, and found the problem solved. Then, I re-enabled it, and the problem is still solved. So the mystery remains, but not the problem.
I don't have VS2012 (I went up to 2005), but from what I remember, this is configurable from the IDE. In VS2005 go to the menu, choose Tools, then Options, then Documents, then you'll see the options to detect when files are changed externally, and to auto-load files changed externally. I think in VS2012 it'll be similar.

The Debugger cannot continue running the process. Unable to start debugger

I have a Lightswitch 2012 application. It's been working fine for weeks. I made some changes and F5 stopped working. When I click on Start (toolbar) it gives this error message and does nothing.
"The Debugger cannot continue running the process. Unable to start debugging"
Note: It does compile file, it just doesn't run.
If I rollback to an earlier version then it works fine - i.e. it is solution specific.
Here is a video of the current version of my solution with the problem:
http://screencast.com/t/TD4RzLASO
and here is the previous version of the solution from earlier today (and no, I don't know what I changed). As you can see, at least it does something with F5 or Start:
http://screencast.com/t/wX5fRDPz
Rebooting doesn't help... ;)
Maybe you should select start up project which can be started.
Solution Explorer -> On your startable project right mouse click -> Set as Start up Project.
I had this situation when i unloaded my main lightswitch project and other project which is dll has been selected automatically and when i reloaded my main project "The Debugger cannot continue running the process. Unable to start debugging" exception was shown, because debuger was trying to load DLL.
Sometimes you need to start up a project which is compiled as a dll, for instance when testing WCF services.
To do so:
Projects -> 'Set Startup Projects...' -> Select 'Multiple Startup Projects' and set action to 'Start' for each one.
It's a pity you didn't recorded the whole screen, so I can't confirm, but I had the same error a few times...
When this happens, my "output panel" isn't visible and even I try to go on Menu -> View -> Output the panel don't appear.
I need to restart my Visual Studio 2013.
Then my output panel is visible again and everything works fine.
I discovered the cause was an extension which I installed on my Visual Studio.
I encountered this problem after removing some projects from the solution. I wasn't able to pinpoint the exact cause, but closing the solution, deleting the solution file, then opening the project and re-adding supporting projects solved the issue for me. Kind of a sledge hammer, but only takes a minute to do if you don't have a lot of projects.
Also, there are some people that uses a "One Click" Certification in your settings that you'll want to make sure its set up right, re-install or unchecked in-which this case was my problem. I finally got it working myself, but check that too just in case. Again this would be for most Visual Studio Versions only. Im 2013 Ult.

Subsonic 3 templates in VS 2010 Beta 2

I am trying to setup Subsonic ActiveRecord in a web application in Visual Studio 2010 beta 2. In any scenario I get the same error:
Warning 1 The path 'D:\Work\Project\tt\SQLServer.ttinclude' must be either local to this computer or part of your trusted zone.
Everything works just fine on the same machine with VS 2008.
Does anyone else have this problem? Is it supposed to work with VS 2010 and .net 4.0 or I should stick with vs 2008 for the time beeing?
Ok, figured out one solution. I'm sure there could be others out there. I got around this issue by opening VS.NET 2010 and selecting 'Tools | Extenstion Manager' and clicking on the "Online Gallery" option. I selected the Tangible T4 Template Editor and installed the plugin/extension. If you don't see the extension then try sorting by highest rated or perform a search for it.
I closed VS and re-opened the tt file after closing it and voila! No more compile errors ;)
HTH
I had this exact same error "must be either local to this computer or part of your trusted zone", I did get it to work without adding anything to the Trusted Zone, the only thing I did was remove the "language" setting in the SQLServer.ttinclude file, and then edit the files a little (add a space, remove it, save etc.) not sure if this was enough to convince it to build properly the next time I did "Run Custom Tool" on each of the T4 files, but it worked, phew!
I recently hit this on a new Windows 7 (64 bit) install. Once you download the archive, right click on the file and select Unblock before you extract it and all is well. Note that this applies to the VS 2010 release as well.
Add the network share to Trusted sites. First uncheck the Require server verification (https:) for all sites in this zone checkbox.

Resources