Merge remote-tracking branch 'origin/master' into 1.7

# Conflicts:
#	Flax.flaxproj
This commit is contained in:
Wojtek Figat
2023-10-09 12:40:47 +02:00
86 changed files with 1406 additions and 686 deletions

View File

@@ -154,7 +154,7 @@ namespace Flax.Build
// Run the compilation
using var memoryStream = new MemoryStream();
CSharpParseOptions parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9).WithPreprocessorSymbols(PreprocessorSymbols);
CSharpParseOptions parseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Latest).WithPreprocessorSymbols(PreprocessorSymbols);
var syntaxTrees = new List<SyntaxTree>();
foreach (var sourceFile in SourceFiles)
{

View File

@@ -641,6 +641,44 @@ namespace Flax.Build.Projects.VisualStudio
File.WriteAllText(e.Key, profile.ToString(), Encoding.UTF8);
}
}
// Generate Rider-specific configuration files
{
StringBuilder dotSettingsFileContent = new StringBuilder();
string dotSettingsUserFilePath = solution.Path + ".DotSettings.user";
// Solution settings (user layer)
bool useResharperBuild = false; // This needs to be disabled for custom build steps to run properly
if (File.Exists(dotSettingsUserFilePath))
{
foreach (var line in File.ReadAllLines(dotSettingsUserFilePath))
{
if (line.Contains(@"/UseMsbuildSolutionBuilder/@EntryValue"))
{
if (!useResharperBuild)
{
dotSettingsFileContent.Append("\t").Append(@"<s:String x:Key=""/Default/Environment/Hierarchy/Build/SolBuilderDuo/UseMsbuildSolutionBuilder/@EntryValue"">No</s:String>");
if (line.Contains("</wpf:ResourceDictionary>"))
dotSettingsFileContent.Append("</wpf:ResourceDictionary>\n");
else
dotSettingsFileContent.Append("\n");
}
continue;
}
dotSettingsFileContent.Append(line).Append("\n");
}
}
else
{
dotSettingsFileContent.Append(@"<wpf:ResourceDictionary xml:space=""preserve"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"" xmlns:s=""clr-namespace:System;assembly=mscorlib"" xmlns:ss=""urn:shemas-jetbrains-com:settings-storage-xaml"" xmlns:wpf=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">").Append("\n");
if (!useResharperBuild)
dotSettingsFileContent.Append("\t").Append(@"<s:String x:Key=""/Default/Environment/Hierarchy/Build/SolBuilderDuo/UseMsbuildSolutionBuilder/@EntryValue"">No</s:String>");
dotSettingsFileContent.Append("</wpf:ResourceDictionary>\n");
}
Utilities.WriteFileIfChanged(dotSettingsUserFilePath, dotSettingsFileContent.ToString());
}
}
/// <inheritdoc />