We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0b351bb + 04b41c0 commit 93b7c94Copy full SHA for 93b7c94
ElectronNET.CLI/Commands/InitCommand.cs
@@ -5,6 +5,7 @@
5
using System.Runtime.InteropServices;
6
using System.Text;
7
using System.Threading.Tasks;
8
+using System.Xml;
9
using System.Xml.Linq;
10
11
namespace ElectronNET.CLI.Commands
@@ -147,10 +148,19 @@ private static bool EditCsProj(string projectFile)
147
148
stream.SetLength(0);
149
stream.Position = 0;
150
- xmlDocument.Save(stream);
151
+ var xws = new XmlWriterSettings
152
+ {
153
+ OmitXmlDeclaration = true,
154
+ Indent = true
155
+ };
156
+ using (XmlWriter xw = XmlWriter.Create(stream, xws))
157
158
+ xmlDocument.Save(xw);
159
+ }
160
- Console.WriteLine($"{ConfigName} added in csproj!");
161
}
162
+
163
+ Console.WriteLine($"{ConfigName} added in csproj!");
164
return true;
165
166
0 commit comments