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.
This commit is contained in:
2023-10-11 21:42:06 +03:00
parent 0d7e7c30ca
commit 5b3e09baec

View File

@@ -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."))
{