Explorar el Código

VS: Fix paths in multi-target SDK-style projects

Set the `AppendTargetFrameworkToOutputPath` property to `false` only for
single target SDK-style projects.  This prevents outputs from being
overwritten during the build.  This revises commit 7671d71299 (VS: Fix
target output paths in SDK-style projects, 2022-09-23, v3.25.0-rc1~82^2).

Fixes: #24094
Issue: #23989
Sebastian Maisch hace 3 años
padre
commit
d2d1be0671
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Source/cmVisualStudio10TargetGenerator.cxx

+ 2 - 1
Source/cmVisualStudio10TargetGenerator.cxx

@@ -903,7 +903,6 @@ void cmVisualStudio10TargetGenerator::WriteSdkStyleProjectFile(
     // of the IDE.
     e1.Element("VCProjectUpgraderObjectName", "NoUpgrade");
     e1.Element("ManagedAssembly", "true");
-    e1.Element("AppendTargetFrameworkToOutputPath", "false");
 
     cmValue targetFramework =
       this->GeneratorTarget->GetProperty("DOTNET_TARGET_FRAMEWORK");
@@ -912,9 +911,11 @@ void cmVisualStudio10TargetGenerator::WriteSdkStyleProjectFile(
         e1.Element("TargetFrameworks", *targetFramework);
       } else {
         e1.Element("TargetFramework", *targetFramework);
+        e1.Element("AppendTargetFrameworkToOutputPath", "false");
       }
     } else {
       e1.Element("TargetFramework", "net5.0");
+      e1.Element("AppendTargetFrameworkToOutputPath", "false");
     }
 
     std::string outputType;