File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,9 @@ public CompilerVersion(Options options)
7474 specifiedFramework = compilerDir ;
7575 }
7676
77- var versionInfo = FileVersionInfo . GetVersionInfo ( SpecifiedCompiler ) ;
77+ // If csc is specified as compiler name, then attempt to read the version information from csc.dll
78+ var compilerBinaryName = SpecifiedCompiler . EndsWith ( "csc" ) ? $ "{ SpecifiedCompiler } .dll" : SpecifiedCompiler ;
79+ var versionInfo = FileVersionInfo . GetVersionInfo ( compilerBinaryName ) ;
7880 if ( ! knownCompilerNames . TryGetValue ( versionInfo . OriginalFilename ?? string . Empty , out var vendor ) )
7981 {
8082 SkipExtractionBecause ( "the compiler name is not recognised" ) ;
Original file line number Diff line number Diff line change @@ -226,6 +226,11 @@ function RegisterExtractorPack(id)
226226 prepend = { ' --compiler' , ' "${compiler}"' },
227227 order = ORDER_BEFORE
228228 }),
229+ CreatePatternMatcher ({ ' ^csc$' }, MatchCompilerName ,
230+ extractor , {
231+ prepend = { ' --compiler' , ' ${compiler}' },
232+ order = ORDER_BEFORE
233+ }),
229234 MsBuildMatcher ,
230235 function (compilerName , compilerPath , compilerArguments , _languageId )
231236 -- handle cases like `dotnet exec csc.dll <args>` and `mono(-sgen64) csc.exe <args>`
You can’t perform that action at this time.
0 commit comments