mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
update<project>: downgrade .NET to 4.6; using Newtonsoft.JSON instead of System.Text.Json; using ILRepack to publish single executable file
This commit is contained in:
parent
dc17bb4b12
commit
0af951bb9a
11 changed files with 30 additions and 45 deletions
|
@ -1,7 +1,7 @@
|
|||
using Microsoft.Win32;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Windows;
|
||||
|
||||
namespace SourceGit {
|
||||
|
@ -55,7 +55,7 @@ namespace SourceGit {
|
|||
var dir = Path.GetDirectoryName(settingFile);
|
||||
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
|
||||
|
||||
var data = JsonSerializer.Serialize(Setting, new JsonSerializerOptions() { WriteIndented = true });
|
||||
var data = JsonConvert.SerializeObject(Setting, Formatting.Indented);
|
||||
File.WriteAllText(settingFile, data);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ namespace SourceGit {
|
|||
if (!File.Exists(settingFile)) {
|
||||
Setting = new Preference();
|
||||
} else {
|
||||
Setting = JsonSerializer.Deserialize<Preference>(File.ReadAllText(settingFile));
|
||||
Setting = JsonConvert.DeserializeObject<Preference>(File.ReadAllText(settingFile));
|
||||
}
|
||||
|
||||
// Try auto configure git via registry.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue