VS: When not referencing output assembly do not try to copy it either

When generating a `ProjectReference` with `ReferenceOutputAssembly` set
to `false`, also set `CopyToOutputDirectory` to `Never`.  Otherwise
MSBuild might report a diagnostic like

    Project '<name>' is not up to date.
    CopyLocal reference '...\ZERO_CHECK' is missing from output location.

and rebuild the referencing project unnecessarily.
This commit is contained in:
Andreas Schönle
2018-05-03 19:39:54 +02:00
committed by Brad King
parent dd3e1a7372
commit 91754b4e60

View File

@@ -3816,6 +3816,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
}
if (dt->GetManagedType("") < check || unmanagedStatic) {
e2.Element("ReferenceOutputAssembly", "false");
e2.Element("CopyToOutputDirectory", "Never");
}
}
e2.EndElement();