English 中文(简体)
How long does my Visual Studio C# compile take?
原标题:

It seems like it should be possible to configure Visual Studio to print out how long the compile takes.

Perhaps somewhere in the .sln file. If the sln is compiled from the command line using msbuild, it prints the time.

最佳回答
  1. Right click on the Solution in the Solution Explorer and pick "Project Build Order"
  2. Note which is the first project to be built and the last one to be built.
  3. In the first project go to the Pre-build event command line and enter: "ver | time"
  4. In the last project go to the Post-build event command line and enter: "ver | time"

You will see in the "Output" window the beginning time and the end time. Do the math!

Exercise for the reader: Pipe the output of the two commands to a file and subtract them and output it to the output window.

问题回答

Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity

Edit: On VS2008, this gives you the information on a project by project basis. I did not find a way to get the information for the whole solution build.

Adjust the MSBuild output level.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签