Merge pull request #41410 from neikeq/no-bom-on-csproj-creation

C#: Save newly created csproj files without BOM
This commit is contained in:
Rémi Verschelde 2020-08-21 02:02:17 +02:00 committed by GitHub
commit 0559d1001c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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