diff --git a/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs b/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs index 44a2c247a..a47a048aa 100644 --- a/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs +++ b/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs @@ -37,7 +37,7 @@ namespace Flax.Build.Platforms public LinuxPlatform() { // Try to use system compiler - if (Platform.BuildTargetPlatform == TargetPlatform.Linux) + if (BuildTargetPlatform == TargetPlatform.Linux) { // Pick the newest compiler (overriden by specified in command line) if (Which(Configuration.Compiler) != null) @@ -67,7 +67,7 @@ namespace Flax.Build.Platforms Log.Verbose($"Using native Linux toolchain (compiler {Compiler})"); HasRequiredSDKsInstalled = true; } - else if (Platform.BuildTargetPlatform != TargetPlatform.Mac) + else if (BuildTargetPlatform != TargetPlatform.Mac) { // Check if Linux toolchain is installed string toolchainName = "v13_clang-7.0.1-centos7"; @@ -76,9 +76,11 @@ namespace Flax.Build.Platforms { if (string.IsNullOrEmpty(toolchainsRoot)) { - Log.Warning("Missing Linux Toolchain. Cannot build for Linux platform."); + if (BuildTargetPlatform == TargetPlatform.Linux) + Log.Warning("Missing Linux Toolchain. Cannot build for Linux platform."); + else + Log.Verbose("Missing Linux Toolchain. Cannot build for Linux platform."); } - return; } diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs index a6684d6eb..5bf8be5c8 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioProjectGenerator.cs @@ -24,6 +24,13 @@ namespace Flax.Build.Projects.VisualStudio /// public override void Generate(string solutionPath) { + // Try to reuse the existing project guid from existing files + ProjectGuid = GetProjectGuid(Path, Name); + if (ProjectGuid == Guid.Empty) + ProjectGuid = GetProjectGuid(solutionPath, Name); + if (ProjectGuid == Guid.Empty) + ProjectGuid = Guid.NewGuid(); + var gen = (VisualStudioProjectGenerator)Generator; var projectFileToolVersion = gen.ProjectFileToolVersion; var vcProjectFileContent = new StringBuilder(); @@ -500,7 +507,15 @@ namespace Flax.Build.Projects.VisualStudio firstEditorMatch = i; } } - if (firstFullMatch != -1) + if (project is AndroidProject) + { + // Utility Android deploy project only for exact match + if (firstFullMatch != -1) + projectConfiguration = configuration; + else + projectConfiguration = new SolutionConfiguration(project.Configurations[0]); + } + else if (firstFullMatch != -1) { projectConfiguration = configuration; build = solution.MainProject == project || (solution.MainProject == null && project.Name == solution.Name);