TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ IsCompatibleDotnetSdkAvailable()

static bool Terraria.ModLoader.UI.UIModSources.IsCompatibleDotnetSdkAvailable ( )
inlinestaticprivate

Definition at line 503 of file UIModSources.cs.

504 {
505 if (dotnetSDKFound)
506 {
507 return true;
508 }
509 try
510 {
511 string output = Process.Start(new ProcessStartInfo
512 {
513 FileName = (GetSystemDotnetPath() ?? "dotnet"),
514 Arguments = "--list-sdks",
515 UseShellExecute = false,
517 }).StandardOutput.ReadToEnd();
518 Logging.tML.Info((object)("\n" + output));
519 string[] array = output.Split('\n');
520 foreach (string line in array)
521 {
522 if (new Version(new Regex("([0-9.]+).*").Match(line).Groups[1].Value).Major == Environment.Version.Major)
523 {
524 dotnetSDKFound = true;
525 return true;
526 }
527 }
528 }
529 catch (Exception e)
530 {
531 Logging.tML.Debug((object)"'dotnet --list-sdks' check failed: ", e);
532 }
533 return dotnetSDKFound;
534 }
@ Environment
Will override vanilla SceneEffect for Sandstorm, Hell, Above surface during Eclipse,...

References Terraria.ModLoader.UI.UIModSources.dotnetSDKFound, Terraria.ModLoader.Environment, Terraria.ModLoader.UI.UIModSources.GetSystemDotnetPath(), and Terraria.ModLoader.Logging.tML.

Referenced by Terraria.ModLoader.UI.UIModSources.ShowInfoMessages().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: