dotnet / dotnet/msbuild

RAR: add control over whether to copy .xml and/or .pdb to output

Open
#2,774 0 comments 0 reactions 0 assignees View on GitHub
Area: Task: Resolve Assembly References (RAR) Area: Tasks triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

For `` items we should have more fine-grained control over whether to copy the related .pdb and .xml to output or not.

The .xml files actually don't need to be in the output directory because they are only useful for the IDE to show intellisense, and the IDE takes them directly from where the reference is first resolved. We only need to copy the XML file to output that comes from Csc.

Just turning off copying would be a breaking change (since builds may have validation that checks that the .xml files are in the output).

Proposal:

1. consider introducing an MSBuild property that controls whether to copy .xml files to output or not. Default it to true.
2. same for .pdbs I think (also default it to true).
3. Pass the properties to RAR so RAR can only include related files if that property is enabled: http://source.dot.net/#Microsoft.Build.Tasks.Core/AssemblyDependency/ReferenceTable.cs,2737
4. Consider adding item metadata "RelatedFilesToCopyToOutput" that can by default be RelatedFileExtensions: http://source.dot.net/#Microsoft.Build.Tasks.Core/AssemblyDependency/ResolveAssemblyReference.cs,23b76c72b911f0c9 This should give more fine-grained control per reference item (to override the properties set in 1 and 2)

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.