VS 2012 - Solution Explorer show (slow) - performance

I'm working on a web site (not web aplication project) and I have problems with IDE performance. For example when I add a new class to the project or I'm working on an existing one and click the Solution Explorer, before the window shows there it takes a lot of time and freezes VS.
I'm looking for which options to disable in VS, because it's really annoying.
For now I unchecked the Track Active Items in Solution Explorer in Options/Projects and Solutions/General, but there must be something else.
I have VS 2012 Premium.

The Windows SysInternals website has a tool called Process Monitor (http://technet.microsoft.com/de-de/sysinternals/bb842062) that can sniff registry and file accesses by any running program. You can try to find what takes so long by using this tool.
Take a look at this article as well: http://blog.geocortex.com/2007/12/07/slow-visual-studio-performance-solved/ - in that case the reason was a folder C:\Users\$username\AppData\Local\Microsoft\WebSiteCache.

Related

Force loading all projects with lightweight solution load enabled

I am using Visual Studion 2017 and lightweight solution load enabled. This is a great performance improvement, especially when I am just switching between different branches.
However, sometimes I want to load every project inside my solution. Currently I right click my solution in solution explorer and open Configuration manager which does what I want (but shows configuration manager) afterwards.
Is there a better way to achive this, preferable in the background so I can continue typing while visual studio loads all projects in the background.

Unable to open visual basic 6 project on visual basic 8

I've created a project on VB6 at but when I am opening it on VB8, it shows the following error:
How to fix it?
As listed by GSerg in the comments, this appears to be a known issue documented in Microsoft Knowledge Base article 896292: You receive a "The remote procedure call failed" error message when you upgrade a Visual Basic 6.0 project to Visual Studio .NET 2003 or Visual Studio 2005 on Windows Server 2003 SP1 or on Windows XP SP2
To reproduce the solution here:
Cause
This behavior occurs because the VBU.exe tool has compatibility issues with the Data Execution Prevention (DEP) option.
Note: The VBU.exe tool starts when you upgrade the Visual Basic 6.0 project by using the Visual Basic Upgrade Wizard in the Microsoft Visual Studio .NET IDE.
Workaround
To work around this behavior, add the VBU.exe tool to the DEP exclusion list. To do this, follow these steps:
Click Start, click Control Panel, and then double-click System. The System Properties dialog box appears.
Click the Advanced tab, and then click Settingsunder Performance. The Performance Options dialog box appears.
Click the Data Execution Prevention tab. Verify that the Turn on DEP for all programs and services except those I select option is selected
Note By default, the Turn on DEP for all programs and services except those I select option is selected in Microsoft Windows Server 2003 Service Pack 1 (SP1).
Click Add. Locate and then click to select VBU.exe. Click Open.
In the warning box, click OK. VBU.exe now appears in the DEP program area.
Click Apply, and then click
OK. A dialog box appears that states that you must restart the computer for the setting to take effect. Click OK.
Try do divide your project to small projects(or comment large part of your project) a try again in each small project.
The idea is to find the function that is production the error.
My intuition is telling me that maybe is a DLL or OCX problem. Try to see all the external DLL or OCX calls and remove from the original project and try again the upgrading.
Most developers who move their VB6 projects to .Net do not even try to port them over. Even with third-party "conversion" software, the effort can be incredibly tedious. So much so, that most developers simply re-write the application completely. Consider it a move to a different language. In fact, some developers use that opportunity to port it to C# instead. I'm a die-hard VB6 user/fan but were I to attempt to port my 200 form accounting application, I'd just re-write it in C#. I started porting it, tried third-party conversion apps, just wasn't worth it.

Windows Defender Real Time Protection Service slowing down Visual Studio etc

Since past two months or so I have been observing a strange phenomenon with the Real Time Protection Service that comes bundled in as a part of Windows Defender on Windows 10.
When this service is set to ON Visual Studio builds take an excruciatingly long time to complete. Visual Studio itself takes forever to launch. Further if there are managed add-ins (written using Visual Studio Tools For Office, VSTO) installed in Outlook, Outlook takes 13-14 seconds to launch! When this service is disabled Outlook again launches within two seconds or so.
I have raised this on Twitter with Windows Support and tried discussing this online with Microsoft Support for an hour without any resolution. Looking around the internet I can see there are users who are reporting same problems such as
http://ardalis.com/speed-up-visual-studio-build-times
Slow page refresh times during development
I have been noticing this for only two months or so. I have tried spinning up new VMs in Azure etc. to test this and in every instance I have noticed this Real TIme Protection Service to be the culprit. My main issue is the Outlook Add In load time to be honest.
I tried posting this on Microsoft answer's site here but so far no luck. I was hoping if anyone here knows how to get this resolved without adding exception for Outlook in Real Time Protection Service (after which the add-ins load as expected within 200 milliseconds).
I had the same symptoms and my problem was fixed by disabling logs in Microsoft .Net Framework Assembly Binding Log Viewer (FUSLOGVW.exe). I forgot that I was running a test and left logging on.
Run the viewer as administrator.
Click Settings button.
Check Log Disabled
Try excluding Visual Studio related file types from Windows Defender like this person did for Delphi:
If you are cool with no protection at all you could disable Windows Defender, but I wouldn't recommend it.
Another answer to this problem, rather than excluding certain file extensions from Real Tme Scanning, is to exclude certain directories. Then you can exclude your Delphi/Visual Studio/Eclipse workspace.
I also found that certain apps during development make heavy use of the tmp dir. You can create a specific temp dir for your dev work and then configure your IDE/dev tools to use that temp dir instead of the system one, and then exclude that temp dir from real-time scanning.
Here are two links to fix performance issues caused by Real-Time scanning, by excluding VS processes and Folders,
thus improving the performance of VS in general but especially when Building.
1- Ready PowerShell script:
Adds Windows Defender exclusions for Visual Studio 2019 by Ryan-Efendy
PS: by default executing scripts is disabled, just enable before executing, and disable after executing
Set-ExecutionPolicy unrestricted
run command
Set-ExecutionPolicy restricted
2- Same but you have to do the steps manually.
Tweaking the environment to speed up Visual Studio by Burak Tasci

Visual Studio 2010 hangs when opening websites

My Visual Studio 2010 Professional hangs up 99.999% of the time when I try to open a website as "Remote Site" through an HTTP address. However if i open the site through a unc path instead of through HTTP, it works fine. Of course that is not always feasible, for example when working from offsite. The same sites (assuming they are not NET40 sites) work fine in Visual Studio 2008, so I'm pretty sure it is not a problem with the Front Page Server Extensions.
If i run 2010 in /safe mode, it opens the projects fine. So i figured maybe it was one of my installed extensions. I therefore disabled all my extensions and tried again, but it still hangs up. So it is apparently something in Visual Studio itself that is different between safe and normal modes.
I ran it in logging mode, and checked the log but did not see anything that stuck out to me. The log is uploaded here: http://pastebin.com/aUnVanB1 .
The exact symptoms I am seeing are that when i click on the project name, it pops up and asks me for my credentials. I enter those, and click OK, and it then loads the solution explorer, and i see the tree view, but then it just hangs with the progress dialog that says "Preparing Solution...". The progress bar keeps cycling, but it never finishes loading, and the spot where the properties window would be in the VS UI is completely unpainted, with just a blank, empty, white space.
Any one have any clue what else i could do to try to figure out why 2010 hangs when attempting to load websites via HTTP? Thanks!
Thanks for your question... you gave me the right clue to solve my problem!
My VS 2010 was hanging (in fact was very slow to get available) when I was openening a solution containing a remote website and I was due to press Escape a few times to cancel the pending operation... As you suggest I tried to open such a solution with /safeMode and VS2010 became available quite instantly.
So as you pointed the VS Extensions... I checked mine (all from Telerik): opening the extension manager I discovered that some updates where available. I thought the extensions updates were automatically proposed and so never checked that before. In fact, you need to manually check with the extension manager if some are available.
I've updated all my Telerik extensions... and now I may open normally all solutions including a remote website.
Thanks a lot! Perhaps... you need to updates your extensions???
Check you network order preference in Windows.
I had a similar problem where DNS would cause a hang of 1 minute before trying again (and again and finally on the next network).
Under Network, Advanced Settings (WinXP):

How to improve Visual Studio 2008 Website Compilation Perfomance

I am having severe performance issues when compiling a moderately large ASP.Net website in Visual Studio 2008 (targeting .Net 3.5). I know there are some tips & registry hacks for improving compilation performance in VS 2005, are there any for VS 2008? Specifically, it seems that VS 2008 is compiling the whole website every time F5 is hit, even when no files have changed in that project since the last compile, or perhaps there is some way to skip the validation stage?
Antivirus problems: Make sure that your Antivirus program excludes your project directories! Make sure that your Microsoft.NET directory inside of your Windows directory is also on the exclusion list.
IIS vs. "Cassini" : If you can, use IIS instead of VS's integrated web server (aka "Cassini"). Doing this will prevent the server from having to restart every time you run.
Memory: Do you have enough?
I'm guessing this is an ASP.Net Website project and not an ASP.Net Web Application project. You'll get better compile performance from a Web Application project so you might consider converting it.
For a Website project, you can open the Website in Visual Studio, right click the web site project node in the Solution Explorer and click Properties. When the dialog box opens, click the Build item and set the item labeled "Before Running Startup Page" to "No Build" or "Build Page". This will prevent Visual Studio from compiling all the pages in your site and improve your local development experience at the cost of reduced compilation. Probably a worthy trade-off in your case.
If you have a lot of stuff in App_Code, you may want to move (some of) it to a seperate assembly.
Try renaming your .suo file
Watch out for Dueling Assemblies (where was this article when I was having the problem =) ?), one bad reference was killing me before. I noticed this and other potential problems by looking at the output window during the build process.
.Net 3.5 Service Pack 1 made some big performance gains at least in terms of the IDE and switching from Code to Design view. I don't know if it affects the general compilation speed, but it is worth applying if you've not yet.

Resources