dotnet / dotnet/msbuild

Excludes or removes in project folder don't apply to recursive includes from a parent folder

Open
#1,576 6 comments 3 reactions 0 assignees View on GitHub
bug triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Repro project: [ProjectFolder.zip](https://github.com/Microsoft/msbuild/files/712071/ProjectFolder.zip)

Consider the following project (named `Project.proj`):

```xml






```

The `File` include is recursively including all files starting in the parent directory of the project. The `Exclude` statement is expected to prevent the `Project.proj` file to be excluded.

However, when you build the project:

**EXPECTED:** The `File` item (and hence output message) does not include `Project.proj`
**ACTUAL:** `Project.proj` is included in the file item, as `..\ProjectFolder\Project.proj`

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.