C#: Save newly created csproj files without BOM

(cherry picked from commit b5f6285f34)
This commit is contained in:
Ignacio Etcheverry 2020-08-20 22:39:44 +02:00 committed by Rémi Verschelde
parent a7bd28760e
commit eb30c04c4d
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Text;
using Microsoft.Build.Construction; using Microsoft.Build.Construction;
using Microsoft.Build.Evaluation; using Microsoft.Build.Evaluation;
@ -41,7 +42,8 @@ namespace GodotTools.ProjectEditor
var root = GenGameProject(name); var root = GenGameProject(name);
root.Save(path); // Save (without BOM)
root.Save(path, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false));
return Guid.NewGuid().ToString().ToUpper(); return Guid.NewGuid().ToString().ToUpper();
} }