Add runtime check

This commit is contained in:
JustArchi
2016-08-01 17:10:37 +02:00
parent 66e01113bb
commit 3934a3fdbc
2 changed files with 92 additions and 0 deletions

View File

@@ -488,6 +488,11 @@ namespace ArchiSteamFarm {
Logging.InitCoreLoggers();
Logging.LogGenericInfo("ASF V" + Version);
if (!Runtime.IsRuntimeSupported) {
Logging.LogGenericError("ASF detected unsupported runtime version, program might NOT run correctly in current environment. You're running it at your own risk!");
Thread.Sleep(10000);
}
string homeDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
if (!string.IsNullOrEmpty(homeDirectory)) {
Directory.SetCurrentDirectory(homeDirectory);