Implement support for mono (#806)

* Initial buggy mono support

* Start building generic-netf variant

* Fix CIs

* Disable ILLink.Tasks for generic-netf

* Make generic-netf *special*

* Keep fixing

Don't ask me why reverse order works, this is next-gen msbuild magic

* Mono compat

* Mono compat

* Misc

* Update to .NET Framework 4.7.2

* .NET 4.7.2 compat

* Misc
This commit is contained in:
Łukasz Domeradzki
2018-06-03 07:51:20 +02:00
committed by GitHub
parent 56d48ae210
commit a515de5807
14 changed files with 174 additions and 36 deletions

View File

@@ -198,7 +198,7 @@ namespace ArchiSteamFarm {
BotDatabase botDatabase;
try {
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(await File.ReadAllTextAsync(filePath).ConfigureAwait(false));
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(await RuntimeCompatibility.File.ReadAllTextAsync(filePath).ConfigureAwait(false));
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
return null;
@@ -320,7 +320,7 @@ namespace ArchiSteamFarm {
}
// We always want to write entire content to temporary file first, in order to never load corrupted data, also when target file doesn't exist
await File.WriteAllTextAsync(newFilePath, json).ConfigureAwait(false);
await RuntimeCompatibility.File.WriteAllTextAsync(newFilePath, json).ConfigureAwait(false);
if (File.Exists(FilePath)) {
File.Replace(newFilePath, FilePath, null);