Open obiwanjacobi opened 7 years ago
This occurs due the next code in ManualNester.cs file:
bool mayNeedAttributeSet = item.ContainingProject.IsKind(ProjectTypes.DOTNET_Core, ProjectTypes.UNIVERSAL_APP, ProjectTypes.SHARED_PROJECT);
if (mayNeedAttributeSet)
{
SetDependentUpon(item, parent.Name);
}
else
{
item.Remove();
parent.ProjectItems.AddFromFile(path);
}
It would be better to avoid removing and adding file again to a project and instead just add/remove DependenUpon node. This will allow to store any standard/custom properties unchanged. I guess that for UnNest method it should work similar - currently it MAKES A COPY OF FILE (!!!), which is not needed. Regards, Roman
Installed product versions
Description
When file properties are set, for instance copy-if-newer and the file is nested, the configured properties are reset. I think the build action is preserved.
Steps to recreate
Current behavior
It seems that in nesting the file and therefor changing the project file, any existing child elements in the project xml for that file are removed/overwritten when the DependsOn tag is added.
Expected behavior
I would expect the file properties are preserved when moving and nesting files.