summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index cc2536c..ced0c26 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -750,6 +750,10 @@ bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(
if (!gt->GetConfigCommonSourceFiles(sources)) {
return false;
}
+ // Only "real" targets are allowed to be C# targets.
+ if (gt->Target->GetType() > cmStateEnums::OBJECT_LIBRARY) {
+ return false;
+ }
}
gt->GetLanguages(languages, "");
if (languages.size() == 1) {