VS: Compute managed type from an existing configuration

It is not clear how multiple configurations should be handled here, but
using an existing configuration is at least better than the empty
configuration.
This commit is contained in:
Brad King
2020-05-15 09:20:11 -04:00
parent 1222327c89
commit 27ead9d4b7

View File

@@ -4134,7 +4134,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
}
// Don't reference targets that don't produce any output.
if (dt->GetManagedType("") == cmGeneratorTarget::ManagedType::Undefined) {
if (dt->GetManagedType(this->Configurations[0]) ==
cmGeneratorTarget::ManagedType::Undefined) {
e2.Element("ReferenceOutputAssembly", "false");
e2.Element("CopyToOutputDirectory", "Never");
}