@@ -133,16 +133,33 @@ private void Initialize(string csharpFile, string outAsmFile, string outILFile,
133133 XConsole . WriteLine ( IsDebug ? "'[DEBUG]'" : "`[RELEASE]`" ) ;
134134 }
135135
136+
137+ //
138+ // @TODO @DESIGN: Not sure if I like this.
139+ // All watchers should be albe to run on any installed runtime and this should
140+ // be a dynamic process (the user should be albe to use a command flag)
141+ //
142+ // To be able to do this, the C# and F# (dotnet) watchers would need to work by calling
143+ // a seperate decompilation / dissasembly process.
144+ //
136145 public void InitializeCsharpCompiler ( )
137146 {
138- if ( Environment . Version . Major == 5 )
147+ if ( Environment . Version . Major == 3 )
148+ {
149+ _compiler = new CSharpCodeCompiler ( _configuration [ "DotNetCoreDirPathNet3" ] ) ;
150+ }
151+ else if ( Environment . Version . Major == 5 )
139152 {
140153 _compiler = new CSharpCodeCompiler ( _configuration [ "DotNetCoreDirPathNet5" ] ) ;
141154 }
142155 else if ( Environment . Version . Major == 6 )
143156 {
144157 _compiler = new CSharpCodeCompiler ( _configuration [ "DotNetCoreDirPathNet6" ] , LanguageVersion . Default ) ;
145158 }
159+ else if ( Environment . Version . Major == 7 )
160+ {
161+ _compiler = new CSharpCodeCompiler ( _configuration [ "DotNetCoreDirPathNet7" ] , LanguageVersion . Default ) ;
162+ }
146163 else
147164 {
148165 _compiler = new CSharpCodeCompiler ( _configuration [ "DotNetCoreDirPathDefault" ] ) ;
@@ -869,7 +886,7 @@ public DecompilationUnit DecompileToASM(string code)
869886 }
870887 else if ( attribute == "PGO" )
871888 {
872- List < string > messages = new ( ) ;
889+ List < string > messages = new List < string > ( ) ;
873890 //
874891 // If PGO is not enabled then don't even bother running any methods.
875892 //
0 commit comments