msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Allow extending common DependsOn properties

Open JanKrivanek opened this issue 1 year ago • 1 comments

Fixes #9755

Context

Allow extending common targets *DependsOn properties It's a continuation of https://github.com/dotnet/msbuild/pull/4922 and https://github.com/dotnet/msbuild/issues/9703 - handling rest of the properties

Changes Made

All *DependsOn properties are defined in nondestructive way

Testing

Existing test

Notes

@ghogen - Once/If this is merged, I'd suggest the DependsOn properties to be prefered extension way over redefining targets from common target files (for https://github.com/MicrosoftDocs/visualstudio-docs-pr/pull/12564)

Dependencies that might possibly be usefull for powerusers to extend include:

Property Added target will run before …
BuildDependsOn The main build entry point
RebuildDependsOn The Rebuild
RunDependsOn The run the final build output (if it is a .EXE)
CompileDependsOn The compilation
CreateSatelliteAssembliesDependsOn The creation of the satellite assemblies
CleanDependsOn The Clean (Deleting of all intermediate and final build outputs)
PostBuildEventDependsOn The PostBuildEvent
PublishBuildDependsOn Build publishing
ResolveAssemblyReferencesDependsOn The 'RAR' target (Finding the transitive closure of dependencies for a given dependencies)

JanKrivanek avatar May 10 '24 06:05 JanKrivanek

Looks good to me!

YuliiaKovalova avatar Jun 04 '24 08:06 YuliiaKovalova

There is no strong consesus on value and even need for this change - so considering nonzero risk of the change - I'm rather pulling this out. There were some minor changes that might still be valuable - extracting those to https://github.com/dotnet/msbuild/pull/10360

JanKrivanek avatar Jul 12 '24 09:07 JanKrivanek