From 5b3e09baec4bb8680186d4d586c71136bc8b4fd1 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 11 Oct 2023 21:42:06 +0300 Subject: [PATCH] Build C# projects in VS/Rider solution configurations Rider's solution wide analysis does not work properly when projects are not included in the active configuration for build. --- .../VisualStudio/VisualStudioProjectGenerator.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs index dd4bf2f42..48ecb6425 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs @@ -518,7 +518,15 @@ namespace Flax.Build.Projects.VisualStudio else if (firstFullMatch != -1) { projectConfiguration = configuration; - build = solution.MainProject == project || (solution.MainProject == null && project.Name == solution.Name); + + // Always build the main project + build = solution.MainProject == project; + + // Build C# projects (needed for Rider solution wide analysis) + build |= project.Type == TargetType.DotNetCore; + + // + build |= solution.MainProject == null && project.Name == solution.Name; } else if (firstPlatformMatch != -1 && !configuration.Name.StartsWith("Editor.")) {