-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Area: DocumentationIssues about docs, including errors and areas we should extend (this repo and learn.microsoft.com)Issues about docs, including errors and areas we should extend (this repo and learn.microsoft.com)
Description
Issue Description
Whether a MSBuild target is skipped or not seems to be determined by the timestamps of its inputs, but in the case when an input is deleted (while others remain the same), the target is still skipped regardless.
Steps to Reproduce
Repro here: https://github.com/zijchen/TargetTest
I created a task to zip a folder to output, initial build creates the .zip file, but if I remove any file from the SourceDirectory
, the target is skipped even though the .zip file has an outdated set of files.
<Target Name="ZipOutputPath" AfterTargets="Build" Inputs="@(ZipFiles)" Outputs="$(OutputPath)\output.zip">
<Message Importance="high" Text="Zipping files @(ZipFiles)" />
<ZipDirectory
SourceDirectory="$(MSBuildThisFileDirectory)\Zip"
DestinationFile="$(OutputPath)\output.zip"
Overwrite="true" />
</Target>
Expected Behavior
MSBuild target to be run when input is deleted.
Actual Behavior
MSBuild target is skipped.
Analysis
No response
Versions & Configurations
No response
Metadata
Metadata
Assignees
Labels
Area: DocumentationIssues about docs, including errors and areas we should extend (this repo and learn.microsoft.com)Issues about docs, including errors and areas we should extend (this repo and learn.microsoft.com)