We are using Visual Studio 2013 on our dev machines and TFS build agent. IntelliSense is not supposed to be available in the version we're using (Premium) but on the build agent it is somehow running anyway with MSTest (verified by IntelliTrace.exe being observed running as a child process of vstest.executionengine.exe and writing large quantities of *.iTrace files to C:\Windows\Temp). This is both consuming disk space and significantly slowing the test runs down by making them artificially disk bound.
The problem is that there doesn't appear to be any way of preventing IntelliTrace from running; this edition of VS2013 doesn't show it in the Tools->Options list, so we can't use the UI-based approach to disable it. Our custom workflow passes /p:EnableIntelliTrace=false as an MSBuild argument, to no effect.
Does anybody know of a way we can disable it by other means while still having the build & test run pass? (Registry, file renaming, etc). We don't foresee ever having to run IntelliTrace on the machines in question.
You can just delete /p:EnableIntelliTrace=true instead of /p:EnableIntelliTrace=false to disable the IntelliTrace run during MSbuild.
If this is no effect on your build agent. It seems related to the VS on your build agent. Try to disable the settings of testsettings file, and try again.
Detail steps you can refer this link: How to disable / turn off IntelliTrace on TFS MsBuild server?
Moreover, there should be the option of with IntelliTrace with VS2013. Please check the info of this blog IntelliTrace using Visual Studio 2013 Preview
Since VS 2012 IntelliTrace and other data colelcotrs are configured in .testsettings configuration file. If this file is not explicitly given, the default one is used. I'm not sure but it seems to me that in your case IntelliTrace is enabled in a default configuration. My suggestion is to try the following steps:
Add .testsettings file to a solution. To do so right click the solution in VS. Then select Add -> New item... and find Test Settings.
A new configuration file will be added to your solution and by default IntelliTrace should be disable. If you double click this file, a new window with various options will be displayed so you can verify if the configuration is correct.
Tell MSTest to use your own .testsettings file. It can be done with /testsettings parameter.
You still can use .runsettings to disable IntelliTrace (https://msdn.microsoft.com/en-us/library/jj635153.aspx?f=255&MSPPError=-2147217396). It's not documented anywhere. Just copy DataCollector for IntelliTrace from the .testsettings file and disable all collections.
Related
In Visual Studio 2019 I'm unable to get System.Diagnostics.Debug.WriteLine() to show anything in either the Output(Debug) windown nor the Immediate Window. I've got my options settings for 'Debugging->General->Redirect All Output Windown Text to the Immediate Window' unchecked.
I'm able to see the output of Console.WriteLine in both the browser console and the VS Output window.
My code is a multiproject one with Blazor and razor classes.
I'm looking for a super simple explaination as I've been searching Google trying to find the solution for an hour now and nothing is helping.
Thanks in advance!
I did not have the same situation as you described in my side.
And you should check your Vs environment or try the following steps:
1) disable any vs installed extensions under Extensions-->Manage Extensions-->Installed to check if there is an extension caused that.
2) reset all settings under Tools-->Import and Export Settings-->Reset all settings. And you can also make a backup about your settings
3) use devenv /safemode under Developer Command Prompt for VS to start a pure VS and then test your project there.
4) close VS, delete .vs hidden folder under the solution folder, bin and obj folder, then restart your project to test it. Besides, you can also create a new project to test whether the issue happens on a new project.
5) make a initial to your VS, close VS, rename C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_xxx to another name, and it stores all your current settings and environment of VS. Renaming it is equivalent to making a backup. Then, restart VS.
6) repair VS or update it to the latest version if there is a new update.
Besides, you can also share a small sample about your project to help us troubleshoot the issue.
When I run my Web API application I get the following window:
It just stays like that indefinantly, until I hit cancel.
When I do hit cancel, this error message is shown:
I have tried rebooting, and running iisreset /restart but it does not fix it.
Any ideas what I can do to get my debugger working again?
NOTE: My Web API 2 project's Servers setting is set to Local IIS. My service is hosted by IIS and when I am not debugging, it works fine.
A possible fix:
Check the "Enable Just My Code" in Tools->Options->Debug
I just did a reset for all the settings for VS and it worked again.
Tools => Import and Export Settings => Reset All Settings
good luck!
I had this issue for Visual Studio 2017 and like with the previous post I had Debugging option "Enable .NET Framework source stepping" ticked. Un-ticking fixed the issue.
So as I commented before I had this same issue, but I now figured out the cause and have a solution.
I just got a new machine last week (this issue was actually one of the reasons why) and after a while I had the same issues, not being able to debug my projects. Luckily because I was installing all the updates one by one I was able to pin-point when it started happening.
It seems the latest update for the "Microsoft ASP.NET and Web Tools" extension breaks something.
Sadly, uninstalling or reverting the Web Tools extension is not easy: Remove this extension by going to the Windows control panel and modifying your Visual Studio installation. I had to remove Visual Studio completely and reinstall it (repair didn't do the trick).
You can update and install all your extensions as you wish, just make sure that you don't update the Web Tools extension
I tested this on my old machine and it did the trick there as well.
I've also created an Issue on GitHub as I won't be updating the extension until this is fixed, if anybody has additional information please add it to the Issue.
In Visual Studio 2015, go to Tools -> Options -> Debugging and deselect "Enable .NET Framework source stepping". This may relate to an issue with loading symbols, so if you want to keep the ability to debug .NET Framework source, then it may help to search the web for how to clear the symbol cache, or preload it, or set your symbol server, and so on.
In Visual Studio 2017, I just restarted my machine and ran the solution, no other windows opened not even a browser, although visual studio took a long time to open (30+ projects in a solution) the problem did not reoccur.
I had the same issue in VS 2017 and un-checking 'Native code' did the trick. Not sure why it was checked.
In my case I set Debugging ->Symbols -> To "Load Only Specified Modules" to include the symbols for, in my case a devops symbols feed for some internal NuGet packages
Options>Debugging>Symbols>Load Only Specified Modules
By checking the option "Always load symbols where located next to modules" the setting won't mess with the regular/classic debugging in VS for your own code
This way the Symbols are still loading where needed and Visual Studio is not trying to load debugging information for all the IIS .net dlls that were loaded by w3wp
Alternatively it can also be configured to not load symbols for microsoft.*.dll and it will also work.
Didn't see this in the current answers, so thought I'd give my 2 cents in 2022:
What worked for me:
Make sure to check that your IIS application pool hasn't been stopped (and restart it if it is), and then if that's not the case, restart your IIS server.
If you don't where those settings are, open our Internet Information Services (IIS) Manager, Application Pools are in the left-hand column, and restart/start/stop your server is in the right column.
When I show any of my solutions' properties and navigate to Common Properties -> Debug Source Files, all I see is the list of projects and their configurations, the same as the Configuration Properties -> Configuration settings. According to #HansPassant below, this is the Configuration Manager that's showing up in both places. As I change back and forth between the two settings, all that changes is the three controls (Configuration, Platform, "Configuration Manager...") at the top of the window are disabled when I'm in "Debug Source Files". I've provided screenshots at the bottom of the question.
I restarted Visual Studio, removed my old and new .suo files, and confirmed that a teammate sees the same behavior for an entirely different solution. These solutions all worked fine under 2013 and earlier. How can I get this back? It's preventing me from setting breakpoints on external code.
Update
I did a repair of Visual Studio 2015, and the required system restart, and it didn't make a difference.
Update 2
I did a complete uninstall (which took multiple attempts, and eventually uninstalling from a system account), and reinstall, as well as installing all important (and most optional) Windows updates. There is still no difference.
After working with Microsoft support, we landed on the solution (which I asked them to pass along as a bug): you need to install the Common Tools for Visual C++ 2015. You can modify your installation to add this, and (for me) it didn't require a machine restart.
I find that in different cases you need to have different exception classes enabled/disabled in the Debug -> Exceptions dialog, and it's hard work to keep reconfiguring this.
So, is there any way to save the Debug -> Exception setting and restore them later?
I'd like to have a couple of different configurations to load depending on my needs.
I am aware that the settings are stored in SlnName.suo, but so are a lot of other stuff and it's a daunting and risky task to fiddle with it.
The question refers to Visual Studio 2010, but I'd be interested to know if the dialog has been improved in this respect in later versions of VS.
According to the following article:
https://faithlife.codes/blog/2010/01/saving_debug_exceptions_settings/
"These settings are stored in the SolutionName.suo file that lives alongside your .sln file. Once you’ve configured the Exceptions dialog to your liking, close all the open windows, then exit Visual Studio. Make a backup of the .suo file and restart Visual Studio. Whenever VS loses your settings, close it down, overwrite the real .suo file with your backup, restart VS, and you’re back to debugging the way you want to."
I'm cheap and don't want to pay for ReSharper or TestDriven.NET, is there a free visual Studio addin for NUnit?
You can create a blank project (Choose console application for example) and in the property of the project you can select DEBUG tag and select "Start External Program". Put the path of Nunit. Then, in the start option, the command line arguments select the DLL that contains all your tests (mine is always in the nunit\bin...). Then select "enable unmanaged code debugging" and you will be able to start the project inside VS and even use the debugger step-by-step.
This is a free solution.
Now you can use Gallio: it's open source. www.gallio.org
By the way TestDriven can be downloaded for free if it's for personal use or Open Source project.
I had to find a way to use .Net Reflector inside VS few days ago and when I downloaded TestDriven it cames with. Never got any popup asking me to paid.
NUnit actually ships with a basic integrated runner. It's not very good, and not very publicized, but unless Charlie has taken it out, it should be in the source.
I know this is an old question but another way to do this is to add an external tool from the tools menu to run nunit - set the arguments to be $(TargetName)$(TargetExt) and initial directory to $(ProjectDir)\bin\Debug
check out this link
This is an old question and things have changed since the answer was accepted.
You may try NCrunch to run tests automatically or manually.
If you're running Visual Studio 2012, there is a plugin written by Charlie Poole, one of the NUnit contributers, that makes use of the new Visual Studio Unit testing plugins.
Download VsTestAdapater - it's also in the extension manager.
Unfortunately it doesn't have much grouping options yet, either by run/not run - so you can't group by class, solution and so on. It also doesn't show you any stacktrace if a test fails, just a simple green tick or red box and a message.
I haven't used it, but NUnitit is a free Visual Studio Add-in for NUnit.
http://nunitit.codeplex.com
From my experience, the best add-in for visual studio is resharper. TestDriven.Net is also good for unit tests. Hope that helps
Also found this one : http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099
It is able to launch your tests in debugger, however you need to recompile the code manually each time you change something - no auto run-build integration