From 34224eb01530bd4dc21d320ea962b2e5ea3b1ef5 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Fri, 14 Jan 2022 21:05:02 +0100 Subject: [PATCH] Test change --- .../Projects/VisualStudio/CSProjectGenerator.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/CSProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/CSProjectGenerator.cs index 11b2d902c..a76ddeebd 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudio/CSProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudio/CSProjectGenerator.cs @@ -34,6 +34,15 @@ namespace Flax.Build.Projects.VisualStudio var projectFileToolVersion = ProjectFileToolVersion; var projectDirectory = Path.GetDirectoryName(project.Path); var defaultTarget = project.Targets[0]; + foreach (var target in project.Targets) + { + // Pick the Editor-related target + if (target.IsEditor) + { + defaultTarget = target; + break; + } + } var defaultConfiguration = TargetConfiguration.Debug; var defaultArchitecture = TargetArchitecture.AnyCPU; var projectTypes = ProjectTypeGuids.ToOption(ProjectTypeGuids.WindowsCSharp); @@ -93,7 +102,7 @@ namespace Flax.Build.Projects.VisualStudio defines += ";"; defines += string.Join(";", configuration.TargetBuildOptions.ScriptingAPI.Defines); } - Log.Info("csprojgen: default_configuration=" + configuration.Name + ", default_platform=" + configuration.PlatformName + ", defines: " + defines + ", for: " + Path.GetFileName(project.Path)); + Log.Warning("csprojgen: defaultTarget=" + defaultTarget + ", default_configuration=" + configuration.Name + ", default_platform=" + configuration.PlatformName + ", defines: " + defines + ", for: " + Path.GetFileName(project.Path)); var outputPath = Utilities.MakePathRelativeTo(project.CSharp.OutputPath ?? configuration.TargetBuildOptions.OutputFolder, projectDirectory); var intermediateOutputPath = Utilities.MakePathRelativeTo(project.CSharp.IntermediateOutputPath ?? Path.Combine(configuration.TargetBuildOptions.IntermediateFolder, "CSharp"), projectDirectory);