Visual Studio Diagnostic Tools. Failed to enable provider - visual-studio

I’m trying to get the Diagnostics Tools in Visual studio 2019 to work while having multiple instances of Visual studio running.
One is fine two works. Three or four, there is where the trouble starts.
Then I get
The diagnostic tool failed unexpectedly.
And in the output window.
Failed to enable provider {E13C0D23-CCBC-4E12-931B-D9CC2EEE27E4}: Insufficient system resources exist to complete the requested service.
My main question is, what system resources?
Is it not memory, I have 16Gb free. Not cpu, it is mainly ideling, and there is plenty of disk.
It does no matter if the other Visual studios are running a debug. Even if I just opened the solution and did nothing after that, they still seem to take up the “system resource”.
Does anyone have an idea of what system resource to get more of? Or is it some limitation / bug in the Diagnostic tools that cause this?
UPDATE
I gave up. Almost a year later and several updates of visual studio, the problem is still present and I have not found the source and have no clue why this keeps happening.

Related

Xamarin Tools for Visual Studio: Almost unusably slow

I'm wondering if there are any workarounds for this issue, as I am plagued by frequent crashes -- though it isn't clear whether the crashes are caused by Resharper, Xamarin Tools or the mixture of C# and F# projects.
When I restart Visual Studio and load a solution containing Xamarin Forms projects, the entire display locks up. After one to three minutes, I get a pop-up saying that an update for Xamarin for Visual Studio is available (Clicking on the pop-up has no effect, so I'm assuming this is a false positive). A few seconds after that, it attempts to connect to my Mac, which is often unsuccessful as I work on my laptop and that connection is only available when I'm at home.
Only when the connection to the Mac has failed am I able to interact with Visual Studio, and then, about 30% of the time, attempting to build, clean or rebulid simply results in a pop-up saying "The operation could not be completed". The only way to fix that is to restart Visual Studio, causing the whole grinding process to restart again.
Xamarin themselves have referred me to these forums. Obviously this is not a pure software question, so I'll try to distill this into specific answerable questions.
Is there a way to prevent the false positive that tells me a new version of Xamarin for Visual Studio is available when it clearly isn't?
Is there a setting that I can use in order to opt in to connecting to the Mac, rather than attempting to make a connection and killing startup time when I know in advance that the connection will not be made?
Has the build problem "This operation could not be completed" been reported anywhere? I haven't found any instances of this problem related to Xamarin or Resharper. But it is frequent.
Does this consistently happen? We've had this problem over the years, but it's gotten much better. Make sure all your machines are synced with the latest Stable update. If on Beta/Alpha, this is typical as we push builds often. The strange part is that you say it's trying to update Xamarin Studio, we actually don't ship Xamarin Studio for Windows anymore: https://www.xamarin.com/faq#xpq6. So it might be a good idea to uninstall a previous version of Xamarin Studio on Windows if it's there.
This is a good point. It's something that might need a small papercut bug filed. Feel free to log an issue here and I can coordinate the status: (https://bugzilla.xamarin.com/enter_bug.cgi?product=Visual%20Studio%20Extensions). In the past I've seen a couple ways around this. 1) Make a seperate .sln that might be called .Windows which will only load Windows native projects (Android, UWP, etc). This way the step is skipped completely. 2) You can simply unload the iOS project until you need to reload the project and work on the iOS side. However I do agree there should be a project property/IDE setting that should say "Start Xamarin Mac Agent on Startup".
That error is really vague. We would need to gather some logs(log files can be gathered from %LOCALAPPDATA%\Xamarin\Log or using Help->Xamarin). This operation could not be completed typically has an error/exception following it like This operation could not be completed: Invalid Pointer. So we would need to dig into logs here and see if we can get a Stack Trace when it happens. I would also try deleting your .suo in the .vs hidden folder of your project directory.

Can't get Visual Studio Diagnostic Tools to work

I'm having some problems getting the Diagnostic Tools in Visual Studio 2015 (with Update 3) to start. I build and launch a project in Debug Mode, the Diagnostic Tools window pops up with the text
Starting Diagnostic Tools...
and after around ten minutes this text disappears but the Diagnostic Tools window remains (with nothing on it). There is no output in the Diagnostics Hub, either. This happens on both x86 and x64 platforms, running VS as administrator doesn't help either.
VShub.exe an the Visual Studio Standard Collector Service are both running.
EDIT: It now fails sooner and the Diagnostic Tools window gives thhe following message:
The diagnostic tools failed unexpectedly. The Diagnostics Hub output in the Output window may contain additional information.
And now the Diagnostics Hub window has the following message:
VsHub failed to locate/start service.
This is an environmental problem, software that is running on the machine is interfering with the proper operation of VSHub.exe. Underlying issue is that it operates a lot like malware does, attaching itself to another process (the program you are trying to debug) and then using a named pipe to talk to another process (the IDE). The "failed to locate/start service" is the diagnostic message for not being able to connect the named pipe.
This behavior is enough to raise the hackles or trigger a bug in the kind of software that tries to stop malware from doing this. Products like Avast, AVG, Sophos, ESET, McAfee have been identified before for being especially unfriendly on a developer's machine. Avast in particular needs to be singled-out as a product that has never stopped causing trouble.
The test is simple, just de-activate the product and check that the delay is now gone. You might limp along by adding specific exclusions for vshub.exe and devenv.exe, but choosing a product more compatible with what a programmer does every day is wise. I've seen, and personally experienced, very few problems with the antimalware solution included with Windows.

Microsoft.VsHub.Server.HttpHostx64.exe consuming loads of resources and crashing Visual Studio 2015

I am experiencing this behavior for some days now.
Microsoft.VsHub.Server.HttpHostx64.exe goes bananas consuming resources and Visual Studio stops responding and crashes when a breakpoint is hit.
I heard this process is related to performance analysis but even if I disable it the problem keeps happening (even though it shouldn't crash VS neither debilitate the user interaction).
Anyone had the same problem and found a solution for this?
VS2015 has a bug which allows the task named Microsoft.VsHub.Server.HttpHost64.exe to consume all the free ram so your computer pages to disk and slows things down. When I killed that task it had no adverse effects on my program, and reduced disk activity from high levels to low levels. The task may restart itself, but instead of consuming 10+ GB of memory, it then consumes about 40MB. The bug only appears when running the GUI / IDE, not your compiled program.
It may be possible to programatically kill that task, haven't tried it.
Also, here is another possible workaround which can be seen at https://connect.microsoft.com/VisualStudio/feedback/details/1610160/microsoft-vshub-server-httphostx64-exe
** The following may require you have administrator privileges on the box ***:
1. close all instances of Visual Studio 2015
2. Locate directory C:\Program Files (x86)\Common Files\Microsoft Shared\VsHub\
3. Rename VsHub to VsHub-Suppressed
Once the above has been performed, Visual Studio 2015 will start noticeably quicker.

Visual Studio Devenv.exe high cpu Usage

I am using VS 2013 ultimate, working on a project with Team Foundation Server. The problem is, every ten seconds, it hangs for up to 5 seconds, I am not compiling or anything, just writing code. Devenv.exe process jumps to more than 25% CPU and 670k of RAM. I have looked at the output from the JavaScript Language Service, and it constantly checks and says Referenced file 'D:\tfs\xxx.aspx' not found. Text search of the filename xxx.aspx in entire solution turns up nothing and I have the latest version. I think this is the reason of the spikes, does anyone know how I can turn off this feature in VS 2013?
EDIT: I have looked at other solutions, Browser Link is closed, I have the latest update
EDIT: I have found the solution, but I dont think it will really help anyone else. One of the guys referenced a hard drive path on top of a javascript page, and since the project is tens of thousands lines, cpu spiked as Visual Studio was searching it. Deleting the references helped in my case.
To narrow down this issue:
Try to disconnect from TFS server. (In VS→ Team → Disconnect from
Team Foundation Server) Check whether this abnormal phenomena still exist.
Use devenv/resetuserdata command to clear user settings of VS,
details refer to this blog: VSTS Tip: devenv /resetuserdata
If you are using proxy in your machine, try to disable the proxy
settings.
If there is anti-virus in the machine, also try to disable it.

Compile on-the-fly in Visual Studio 2008 very slow

I'm experiencing some performance problems. When I edit a file, Visual Studio 2008 performs a background (on-the-fly) compilation and then, it updates the error list. During this time, the cursor in the file editor disappears, and the keys I press to move or type more character are buffered.
Once the background compilation is finished, the changes are reflected in the editor (1 - 2 seconds). Every time I edit a file, which happens often, this happens.
How can I fix this problem? If this is not possible, can I disable this automatic build?
I had an odd performance-related issue today. My Microsoft Visual Studio seemed to be taking far too long to perform even the simplest of operations. I Googled around and tried a few ideas that people had such as disabling add-ins or clearing Visual Studio’s recent projects list but those suggestions didn’t seem to solve the problem. I remembered that the Windows SysInternals website had a tool called Process Monitor that would sniff registry and file accesses by any running program.
It seemed to me that Visual Studio was up to something and Process Monitor should help me figure out what it was. I downloaded the most recent version, and after fiddling around a bit with its display filters, ran it and to my horror, I saw that Visual Studio was so slow because it was accessing the more than 10,000 folders in C:\Users\krintoul\AppData\Local\Microsoft\WebSiteCache on most IDE operations. I’m not sure why there were that many folders and moreover, wasn’t sure what Visual Studio was doing with them, but after I zipped those folders up and moved them somewhere else, Visual Studio’s performance improved tremendously.
The Windows SysInternals website has a number of other useful utilities for network management, security, system information and more. Check it out. I’m sure you’ll find something of value.

Resources