You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
3.2 C#: Upgrade GodotTools to nuget Microsoft.Build
This upgrade is needed in order to support reading and editing project files that use Sdks as well as other new features. A common example in 3.2 is having to specify a PackageReference version with a child element rather than the attribute. This is no longer the case now. Partial cherry-pick off3bcd5f8ddMost of the other changes from that commit were already partially cherry-picked in3928fe200f.
This commit is contained in:
@@ -2,7 +2,6 @@ using System;
|
||||
using System.IO;
|
||||
using System.Security;
|
||||
using Microsoft.Build.Framework;
|
||||
using GodotTools.Core;
|
||||
|
||||
namespace GodotTools.BuildLogger
|
||||
{
|
||||
@@ -18,7 +17,7 @@ namespace GodotTools.BuildLogger
|
||||
if (null == Parameters)
|
||||
throw new LoggerException("Log directory was not set.");
|
||||
|
||||
var parameters = Parameters.Split(new[] { ';' });
|
||||
var parameters = Parameters.Split(new[] {';'});
|
||||
|
||||
string logDir = parameters[0];
|
||||
|
||||
@@ -183,4 +182,17 @@ namespace GodotTools.BuildLogger
|
||||
private StreamWriter issuesStreamWriter;
|
||||
private int indent;
|
||||
}
|
||||
|
||||
internal static class StringExtensions
|
||||
{
|
||||
public static string CsvEscape(this string value, char delimiter = ',')
|
||||
{
|
||||
bool hasSpecialChar = value.IndexOfAny(new[] {'\"', '\n', '\r', delimiter}) != -1;
|
||||
|
||||
if (hasSpecialChar)
|
||||
return "\"" + value.Replace("\"", "\"\"") + "\"";
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user