dotnet / dotnet/msbuild

Incremental builds - MSBuild target is skipped on deleted input

Open
#12,158 2 comments 0 reactions 0 assignees View on GitHub
Area: Documentation triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

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.
```xml




```

### Expected Behavior

MSBuild target to be run when input is deleted.

### Actual Behavior

MSBuild target is skipped.

### Analysis

_No response_

### Versions & Configurations

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.