Skip to content

Targets file should be more incremental #2008

@jonwis

Description

@jonwis

<Target Name="CsWinRTInvokeGuidPatcher"
Condition="'$(DesignTimeBuild)' == ''"
AfterTargets="Compile"
BeforeTargets="Link"
DependsOnTargets="CsWinRTGenerateIIDOptimizerResponseFile">
<Message Text="$(CsWinRTIIDOptimizerCommand)" Importance="$(CsWinRTMessageImportance)" />
<Exec Command="$(CsWinRTIIDOptimizerCommand)" ConsoleToMsBuild="true" IgnoreExitCode="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CsWinRTGuidPatchOutput" />
<Output TaskParameter="ExitCode" PropertyName="CsWinRTGuidPatchExitCode"/>
</Exec>
</Target>

Analyzing build time of a large project internally. Noticed that the CsWinRTInvokeGuidPatcher target is running repeatedly even when things haven't changed.

  • Add Inputs/Outputs attributes to the targets
  • Generate a "marker" file if necessary
  • Remove unused output properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions