summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index b3f8d9057b..c72b10957d 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -373,8 +373,16 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
this->IsPartOfDefaultBuild(configs, projectTargets, target);
cmValue vcprojName = target->GetProperty("GENERATOR_FILE_NAME");
if (vcprojName) {
+ std::string mapping;
+
+ // On VS 19 and above, always map .NET SDK projects to "Any CPU".
+ if (target->IsDotNetSdkTarget() &&
+ this->GetVersion() >= VSVersion::VS16 &&
+ !this->IsReservedTarget(target->GetName())) {
+ mapping = "Any CPU";
+ }
this->WriteProjectConfigurations(fout, *vcprojName, *target, configs,
- configsPartOfDefaultBuild);
+ configsPartOfDefaultBuild, mapping);
}
}
}