66using  Basic . CompilerLog . Util ; 
77using  Microsoft . Build . Logging . StructuredLogger ; 
88using  Microsoft . CodeAnalysis ; 
9+ using  Microsoft . DotNet . Cli . Utils ; 
910
1011namespace  Microsoft . NET . Build . Tests ; 
1112
@@ -18,16 +19,16 @@ public sealed class RoslynBuildTaskTests(ITestOutputHelper log) : SdkTest(log)
1819        _ =>  throw  new  ArgumentOutOfRangeException ( paramName :  nameof ( language ) ) , 
1920    } ; 
2021
21-     private  static string  CoreCompilerFileName ( Language  language )  =>  CompilerFileNameWithoutExtension ( language )  +  ".dll" ; 
22+     private  static string  DotNetExecCompilerFileName ( Language  language )  =>  CompilerFileNameWithoutExtension ( language )  +  ".dll" ; 
2223
23-     private  static string  FxCompilerFileName ( Language  language )  =>  CompilerFileNameWithoutExtension ( language )  +  ".exe" ; 
24+     private  static string  AppHostCompilerFileName ( Language  language )  =>  CompilerFileNameWithoutExtension ( language )  +  FileNameSuffixes . CurrentPlatform . Exe ; 
2425
2526    [ FullMSBuildOnlyTheory ,  CombinatorialData ] 
2627    public  void  FullMSBuild_SdkStyle ( bool  useSharedCompilation ,  Language  language ) 
2728    { 
2829        var  testAsset  =  CreateProject ( useSharedCompilation ,  language ) ; 
2930        var  buildCommand  =  BuildAndRunUsingMSBuild ( testAsset ) ; 
30-         VerifyCompiler ( buildCommand ,  CoreCompilerFileName ( language ) ,  useSharedCompilation ) ; 
31+         VerifyCompiler ( buildCommand ,  AppHostCompilerFileName ( language ) ,  useSharedCompilation ) ; 
3132    } 
3233
3334    [ FullMSBuildOnlyTheory ,  CombinatorialData ] 
@@ -38,7 +39,7 @@ public void FullMSBuild_SdkStyle_OptOut(bool useSharedCompilation, Language lang
3839            doc . Root ! . Element ( "PropertyGroup" ) ! . Add ( new  XElement ( "RoslynCompilerType" ,  "Framework" ) ) ; 
3940        } ) ; 
4041        var  buildCommand  =  BuildAndRunUsingMSBuild ( testAsset ) ; 
41-         VerifyCompiler ( buildCommand ,  FxCompilerFileName ( language ) ,  useSharedCompilation ) ; 
42+         VerifyCompiler ( buildCommand ,  AppHostCompilerFileName ( language ) ,  useSharedCompilation ) ; 
4243    } 
4344
4445    [ FullMSBuildOnlyTheory ,  CombinatorialData ] 
@@ -50,23 +51,23 @@ public void FullMSBuild_NonSdkStyle(bool useSharedCompilation, Language language
5051            project . TargetFrameworkVersion  =  "v4.7.2" ; 
5152        } ) ; 
5253        var  buildCommand  =  BuildAndRunUsingMSBuild ( testAsset ) ; 
53-         VerifyCompiler ( buildCommand ,  FxCompilerFileName ( language ) ,  useSharedCompilation ) ; 
54+         VerifyCompiler ( buildCommand ,  AppHostCompilerFileName ( language ) ,  useSharedCompilation ) ; 
5455    } 
5556
5657    [ FullMSBuildOnlyTheory ,  CombinatorialData ] 
5758    public  void  FullMSBuild_SdkStyle_ToolsetPackage ( bool  useSharedCompilation ,  Language  language ) 
5859    { 
5960        var  testAsset  =  CreateProject ( useSharedCompilation ,  language ,  AddCompilersToolsetPackage ) ; 
6061        var  buildCommand  =  BuildAndRunUsingMSBuild ( testAsset ) ; 
61-         VerifyCompiler ( buildCommand ,  FxCompilerFileName ( language ) ,  useSharedCompilation ,  toolsetPackage :  true ) ; 
62+         VerifyCompiler ( buildCommand ,  AppHostCompilerFileName ( language ) ,  useSharedCompilation ,  toolsetPackage :  true ) ; 
6263    } 
6364
6465    [ Theory ,  CombinatorialData ] 
6566    public  void  DotNet ( bool  useSharedCompilation ,  Language  language ) 
6667    { 
6768        var  testAsset  =  CreateProject ( useSharedCompilation ,  language ) ; 
6869        var  buildCommand  =  BuildAndRunUsingDotNet ( testAsset ) ; 
69-         VerifyCompiler ( buildCommand ,  CoreCompilerFileName ( language ) ,  useSharedCompilation ) ; 
70+         VerifyCompiler ( buildCommand ,  AppHostCompilerFileName ( language ) ,  useSharedCompilation ) ; 
7071    } 
7172
7273    //  https://github.com/dotnet/sdk/issues/49665 
@@ -75,7 +76,7 @@ public void DotNet_ToolsetPackage(bool useSharedCompilation, Language language)
7576    { 
7677        var  testAsset  =  CreateProject ( useSharedCompilation ,  language ,  AddCompilersToolsetPackage ) ; 
7778        var  buildCommand  =  BuildAndRunUsingDotNet ( testAsset ) ; 
78-         VerifyCompiler ( buildCommand ,  CoreCompilerFileName ( language ) ,  useSharedCompilation ,  toolsetPackage :  true ) ; 
79+         VerifyCompiler ( buildCommand ,  DotNetExecCompilerFileName ( language ) ,  useSharedCompilation ,  toolsetPackage :  true ) ; 
7980    } 
8081
8182    private  TestAsset  CreateProject ( bool  useSharedCompilation ,  Language  language ,  Action < TestProject > ?  configure  =  null ,  [ CallerMemberName ]  string  callingMethod  =  "" ) 
0 commit comments