Make it possible to compile commands/plugins with more modern C# features in some cases on Windows

Does require Visual Studio to be installed
This commit is contained in:
UnknownShadow200 2025-05-17 07:57:12 +10:00
parent 177120afd5
commit e6df0cccc4

View File

@ -193,6 +193,8 @@ namespace MCGalaxy.Modules.Compiling
string root = RuntimeEnvironment.GetRuntimeDirectory();
string[] paths = new string[] {
// Modern Visual Studio compilers
@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\csc.exe",
// First try new C# compiler
Path.Combine(root, "csc.exe"),
// Then fallback to old Mono C# compiler