Need dependency analysis output mode /v:depends

More than once I have found that I don't have the right set of "Outputs" for a Target which causes the Target to execute when it doesn't need to. As far as I can tell there isn't a good way to diagnose/debug this issue, at least not using the /verbosity output. Here is what I would like to see. Given this MSBuild project file:

<Project DefaultTargets="Foo" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Foo" Inputs="foo.c" Outputs="Debug\foo.obj">
<Copy SourceFiles="foo.c" DestinationFiles="foo.obj"/>
</Target>
</Project>

Note that this project file is broken since it will always execute the Foo target. In order to debug this I want to be able to run msbuild like so:

msbuild foo.proj /v:depends

and see this:

! msbuild foo.proj /v:depends
Microsoft (R) Build Engine Version 2.0.50215.44
[Microsoft .NET Framework, Version 2.0.50215.44]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Build started 5/23/2005 10:27:32 PM.
__
Project "C:\Temp\foo.proj" (default targets):

Target Foo:
Dependency eval of "C:\Temp\Debug\foo.obj" - file does not exist - executing target
Using "Copy" task from assembly "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Copy"
Copying file from "foo.c" to "foo.obj".
Done executing task "Copy".

Done building project "foo.proj".

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.08

Of course this could also be just part of the "detailed" output.

[2054 byte] By [KeithHill] at [2008-2-4]
# 1
Keith,

You'll be pleased to hear that we have implemented this feature post Beta 2. You will see these kinds of messages produced by the dependency analysis in RTM.

I hope you can hold on until then! :)

..Kieran

KieranMockford at 2007-9-8 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...
# 2
The main thing is that it gets into the product by RTM. I can wait until then although getting an update in an early summer CTP would be nice too. :-)
KeithHill at 2007-9-8 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...

Visual Studio

Site Classified