-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Issue Description
DeepCopyFrom fails to copy metadata values when those values are structured xml.
Steps to Reproduce
Given project xml such as this:
<ItemGroup Label="OptProf Configuration">
<OptProf Include="$(BaseOutputPath)\$(AssemblyName).dll">
<Scenarios>
<TestContainer Name="vside.IdeExp.GetToCodeTests">
</TestContainer>
</Scenarios>
</OptProf>
</ItemGroup>Call ProjectItemElement.DeepCopyFrom and pass in the OptProf item.
Expected Behavior
The item is fully reproduced at the new location:
<OptProf Include="$(BaseOutputPath)\$(AssemblyName).dll">
<Scenarios>
<TestContainer Name="vside.IdeExp.GetToCodeTests">
</TestContainer>
</Scenarios>
</OptProf>Actual Behavior
The xml content of the Scenarios metadata is omitted from the clone:
<OptProf Include="$(BaseOutputPath)\$(AssemblyName).dll">
<Scenarios />
</OptProf>Analysis
Other metadata (in the larger repro) does copy metadata values. The only one that is left empty is this, which uniquely contains xml.
Versions & Configurations
This is with MSBuild 17.2.