dotnet / dotnet/msbuild

Copy task should error if copying multiple sources to the same destination path

Open
#989 10 comments 0 reactions 0 assignees View on GitHub
Area: Tasks triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

A project with multiple items with CopyToOutputDirectory and conflicting assigned TargetPaths will cause the last file to be copied to the TargetPath.

I'm not certain this is a bug, but the behavior seems non-intuitive. It seems like multiple files trying to output to the same TargetPath should cause an error.

An example:

```


Exe
.NETCoreApp
v1.0





Always
otherfilename.json

```

only`project.json` will be copied to `otherfilename.json` and no error is thrown.

cc @rainersigwald @cdmihai @eerhardt

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.