dotnet / dotnet/msbuild

Exclude patterns behaving different in static evaluation and at runtime

Open
#2,491 4 comments 0 reactions 0 assignees View on GitHub
bug Feature - Globbing triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Following up on https://stackoverflow.com/questions/45964967/msbuild-itemgroup-exclude-doesnt-work-with-wildcards

Exclude patterns behave different at runtime than during static evaluation. For example:

```xml
















```

produces:

```
$ dotnet msbuild
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

StaticallyFilteredItem: bin/GeneratedAssembly1.dll
StaticallyFilteredItem: bin/GeneratedAssembly2.dll
StaticallyFilteredItem: somefolder/somefile.txt
StaticallyFilteredItem: somefolder/somefile.exe
StaticallyFilteredItem: bin/anexe.exe
TargetFilteredItem: ../../References/AnotherFolder/ReferencedAssembly.dll
TargetFilteredItem: bin/GeneratedAssembly1.dll
TargetFilteredItem: bin/GeneratedAssembly2.dll
TargetFilteredItem: somefolder/somefile.txt
TargetFilteredItem: somefolder/somefile.exe
TargetFilteredItem: bin/anexe.exe
```

Is this by design and a desired behaviour or a bug?

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.