Measuring total solution build time in Visual Studio [duplicate] - visual-studio

This question already has answers here:
Displaying build times in Visual Studio
(14 answers)
Closed 9 years ago.
Does any know if there is any native mechanism to report on the total solution build time in Visual Studio 2008? You can change the build verbosity to report build times per project as discussed here or report total build time from msbuild but I’d like to see this in the IDE across an entire solution containing many projects. Short of creating custom pre and post build events, does anyone know if there’s any native output for total build time? Thanks!

For the sake of completeness, the correct answer is "No, you can't report on total solution build time directly within Visual Studio".

Not native and not not for VS 2008 (currently only for VS 2010), but the VSCommands 2010 extension provides these statistics.
See also: VS 2010: Prevent display of Build Summary in the output window

MSBuild will show the total build time when you run it from the command prompt, e.g:
> msbuild MySolution.sln
...
Time Elapsed 00:00:36.94

There's also an easy way to measure the build time per project in Visual Studio 2010. I'm pretty sure it will work in Visual Studio 2008, too. All you have to do is to go to Tools -> Options -> Projects and Solutions -> Build and Run and set the MSBuild project build output verbosity to "Normal" or "Detailed" (I recommend "Normal", as detailed gives too much information).

I think you could probably hook into the OnBuildBegin and OnBuildDone events
http://visualstudiohacks.com/general/customize-your-project-build-process/

In VC++2008, there is the "Build Timing' option in Tools / Options / Projects and solutions / VC++ Project Settings

Related

Visual Studio debugger starts Solution build

I've designed a Visual Studio 2022 solution that contains 6 projects. One produces an executable (.exe) and the others produce dlls that are consumed by the executable. I've noticed that when I try to debug the executable, Visual Studio starts a build for the solution every time I debug. I'm at a loss as to why it builds the solution when nothing has changed in any project. I'm assuming that something in a project is causing the build to occur, but, I don't know what that may be.
Any ideas on how to troubleshoot this?
Update: This solution is built for.Net5. I found this setting in the options under SDK-Style projects that does not appear to work.
Go Tools->Options->Projects and Solutions->Build And Run, set MSBuild output to Detailed, build the project, check the output log.
You can also try resetting all settings.
The post, "Visual Studio not auto-building when I press the debug button" solved my problem. I set the following to force Visual Studio to NOT build each time I started the debugger.

Visual Studio 2013 - Slow Extension or Add In - how to find which one?

I have a solution with about 40 projects in it. When I load or unload a project it takes up to 5 minutes and hangs the development environment for the entire time. When I go into safe mode it is about 5s or less. I don't know proc mon very well, but it did show lots of file access outside the project in question.
I'm assuming this is caused by an extension or add in. How do I figure out which one. I have disabled all the ones I can disable but a large proportion of my extensions cannot be disabled. Do I really have to uninstall them all in turn?
Cheers,
James
You can use Process Explorer to find what module in Visual Studio is currently running when VS hangs from the DevEnv.exe process Properties - Threads tab.
DevExpress Assembly Deployment Tool v1.1 with DevExpress 13.2.7
I have discovered why my Visual Studio Environment has been so slow (unusably slow – 10 minutes to do 5 second tasks – locked application for 10 minutes at a time).
Solution is to uninstall VS extension DevExpress Assembly Deployment Tool v1.1.
As detailed here:
https://www.devexpress.com/Support/Center/Question/Details/Q570295

Save All Files Before Build Gone in Visual Studio 2012?

In Visual Studio 2010, there was a setting under Tools --> Options --> Projects and Solutions --> Build And Run --> Before Building (Save all changes). In VS 2012, this setting appears to be gone, and my solution is not saving before build. Note that the projects I am building is a MakeFile project with Clang/LLVM for the compiler, if that is relevant info.
Is there a setting somewhere that I am missing?
According to the answer provided by Vicky Song (Microsoft), the feature is no longer available. If you wish to submit a feature request, they will consider it.
Reference:
http://social.msdn.microsoft.com/forums/vstudio/en-US/be441ff6-682f-4534-b653-99632a7975a4/before-building-settings
This feature is very useful mainly when considering that many users have the Visual Studio to crash randomly (myself as well). So when I want to run a compile-build-test, I would like to save everything open (including the environment that gets lost on those nasty events)...

Has anyone integrated NUnit with Visual Studio 2010?

Has anyone integrated NUnit with Visual Studio? I'm trying to set up a build pipeline like this one. But, I'm pretty new to .NET and I'm still understanding how things work. There are many resources in the internet on NUnit + VS, and I'm confused.
I'd recommend you to use Resharper.
As some say, "It just works".
Disadvantages/side effects of this choice in your case could be:
1. Resharper is not free;
2. Running unit-tests is minor part of Resharper - it also includes tons of other features, which you maybe do not need for now(but you can disable most of them in setttings).
Free solution is - Visual Nunit 2010 Visual studio extension. Free and does exactly what you want.
UPDATE
How to add NUnit to your project.
I've found this tutorial. Follow it step-by-step, I've found it helpful and complete for .NET novices.
The only difference is that in Running Unit-Tests section for running tests author uses test runner tool that is distributed within NUnit itself, but you can use ReSharper runner as described in JetBrains' docs
I'm using this:
http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099
Which works quite well for me. You can access it within VS2010 from View->Other Windows->Visual NUnit
I used TestDriven until it was no longer free, I used Resharper but felt it slowed down my machine too much, I tried the VisualNUnit extension but it appeared to spawn multiple processes of itself that would keep a hold on some of my DLLs, I added NUnit itself as a command under Visual Studio Tools (and also with a toolbar button and some macros in Visual Studio to start the current test and attach) but that cost some effort to set up and didn't feel smooth enough after being spoiled with tools like TestDriven. Eventually I tried NCrunch... I am hooked ever since, and I have even started to favor it over TestDriven! the next tool on my "NUnit bucket list" will be the NUnit extension for Visual Studio 11.
PS: NCrunch should work on your Visual Studio 2010 and the homepage has a very decent demo video.
First download and install the NUnit
Step 1: Open Visual studio
Step 2: Open your project
Step 3: Select Properties from Solution Explorer
Step 4: Select Debug option in the properties window
step 5: select 'Start external program' under the section 'Start Action'
Step 6: Select the path of the NUnit file
Step 7: Save it.
After that when you debug your project NUnit will open.
Setting up Visual C#2010 Express with NUnit
The original and still quite ok test runner.
Test Driven .net
Used to be free, but now costs a small fee unless you're a student or open source developer.
Visual Studio 2011(BETA) is compatible with 2010 and provides test runners out of the box. Refer to Visual Studio 11 Beta Unit Testing – What’s New and Visual Studio 11 Beta - Unit Testing Plugins List. For continuous integration (CI) server U can use TeamCity and also run those test on the server.

Overall build progress Visual studio 2010

Is there a way to see the overall build progress in Visual studio?
In my solution there are nearly more than 30 projects. So it takes a long time to build the entire project.
I am looking for a way to see 8/30 In progress or something similar to that?
It still doesn't tell you progress, but it might help to see the Build Output window. If you know the order of the projects it should give you a feel of how far along the build is.
You can also investigate this Build Progress plugin (leverages the Windows 7 progress taskbar: https://github.com/alastairs/buildprogress/ discussed here http://www.codebork.com/coding/2009/11/04/creating-small-visual-studio-2010-add.html
Here is quite nice extension for Visual Studio:
VSBuildStatus:
http://visualstudiogallery.msdn.microsoft.com/2A2293B4-1808-44AA-B030-661F6803D8A1?SRC=VSIDE
Taskbar Build Progress displays total build progress into taskbar without adding any more clutter to VS.

Resources