@@ -27,7 +27,7 @@ private void RunTheApp(string path, bool selfContained)
2727 Command . Create ( path )
2828 . CaptureStdErr ( )
2929 . CaptureStdOut ( )
30- . DotNetRoot ( selfContained ? null : TestContext . BuiltDotNet . BinPath )
30+ . DotNetRoot ( selfContained ? null : HostTestContext . BuiltDotNet . BinPath )
3131 . Execute ( )
3232 . Should ( ) . Pass ( )
3333 . And . HaveStdOutContaining ( "Hello World!" ) ;
@@ -75,10 +75,10 @@ private void RunApp(bool selfContained)
7575 if ( OperatingSystem . IsWindows ( ) )
7676 {
7777 // StandaloneApp sets FileVersion to NETCoreApp version. On Windows, this should be copied to singlefilehost resources.
78- string expectedVersion = TestContext . MicrosoftNETCoreAppVersion . Contains ( '-' )
79- ? TestContext . MicrosoftNETCoreAppVersion [ ..TestContext . MicrosoftNETCoreAppVersion . IndexOf ( '-' ) ]
80- : TestContext . MicrosoftNETCoreAppVersion ;
81- Assert . Equal ( expectedVersion , System . Diagnostics . FileVersionInfo . GetVersionInfo ( singleFile ) . FileVersion ) ;
78+ string expectedVersion = HostTestContext . MicrosoftNETCoreAppVersion . Contains ( '-' )
79+ ? HostTestContext . MicrosoftNETCoreAppVersion [ ..HostTestContext . MicrosoftNETCoreAppVersion . IndexOf ( '-' ) ]
80+ : HostTestContext . MicrosoftNETCoreAppVersion ;
81+ Assert . Equal ( $ " { expectedVersion } .0" , System . Diagnostics . FileVersionInfo . GetVersionInfo ( singleFile ) . FileVersion ) ;
8282 }
8383 }
8484
@@ -103,14 +103,17 @@ private void NonAsciiCharacterSelfContainedApp()
103103 if ( OperatingSystem . IsWindows ( ) )
104104 {
105105 // StandaloneApp sets FileVersion to NETCoreApp version. On Windows, this should be copied to singlefilehost resources.
106- string expectedVersion = TestContext . MicrosoftNETCoreAppVersion . Contains ( '-' )
107- ? TestContext . MicrosoftNETCoreAppVersion [ ..TestContext . MicrosoftNETCoreAppVersion . IndexOf ( '-' ) ]
108- : TestContext . MicrosoftNETCoreAppVersion ;
109- Assert . Equal ( expectedVersion , System . Diagnostics . FileVersionInfo . GetVersionInfo ( singleFile ) . FileVersion ) ;
106+ string expectedVersion = HostTestContext . MicrosoftNETCoreAppVersion . Contains ( '-' )
107+ ? HostTestContext . MicrosoftNETCoreAppVersion [ ..HostTestContext . MicrosoftNETCoreAppVersion . IndexOf ( '-' ) ]
108+ : HostTestContext . MicrosoftNETCoreAppVersion ;
109+ Assert . Equal ( $ " { expectedVersion } .0" , System . Diagnostics . FileVersionInfo . GetVersionInfo ( singleFile ) . FileVersion ) ;
110110 }
111111 }
112112
113- [ ConditionalTheory ( typeof ( Binaries . CetCompat ) , nameof ( Binaries . CetCompat . IsSupported ) ) ]
113+ [ Theory (
114+ SkipType = typeof ( Binaries . CetCompat ) ,
115+ SkipUnless = nameof ( Binaries . CetCompat . IsSupported ) ,
116+ Skip = "CET is not supported on this platform" ) ]
114117 [ InlineData ( true ) ]
115118 [ InlineData ( false ) ]
116119 public void DisableCetCompat ( bool selfContained )
@@ -124,12 +127,12 @@ public void DisableCetCompat(bool selfContained)
124127 Command . Create ( singleFile )
125128 . CaptureStdErr ( )
126129 . CaptureStdOut ( )
127- . DotNetRoot ( TestContext . BuiltDotNet . BinPath , TestContext . BuildArchitecture )
130+ . DotNetRoot ( HostTestContext . BuiltDotNet . BinPath , HostTestContext . BuildArchitecture )
128131 . MultilevelLookup ( false )
129132 . Execute ( )
130133 . Should ( ) . Pass ( )
131134 . And . HaveStdOutContaining ( "Hello World" )
132- . And . HaveStdOutContaining ( TestContext . MicrosoftNETCoreAppVersion ) ;
135+ . And . HaveStdOutContaining ( HostTestContext . MicrosoftNETCoreAppVersion ) ;
133136 }
134137
135138 [ Theory ]
@@ -158,7 +161,7 @@ public void FrameworkDependent_NoBundleEntryPoint()
158161
159162 using ( var dotnetWithMockHostFxr = TestArtifact . Create ( "mockhostfxrFrameworkMissingFailure" ) )
160163 {
161- var dotnet = new DotNetBuilder ( dotnetWithMockHostFxr . Location , TestContext . BuiltDotNet . BinPath , null )
164+ var dotnet = new DotNetBuilder ( dotnetWithMockHostFxr . Location , HostTestContext . BuiltDotNet . BinPath , null )
162165 . RemoveHostFxr ( )
163166 . AddMockHostFxr ( new Version ( 2 , 2 , 0 ) )
164167 . Build ( ) ;
@@ -177,7 +180,7 @@ public void FrameworkDependent_NoBundleEntryPoint()
177180 }
178181
179182 [ Fact ]
180- [ PlatformSpecific ( TestPlatforms . Windows ) ] // GUI app host is only supported on Windows.
183+ [ PlatformSpecific ( TestPlatforms . Windows ) ]
181184 public void FrameworkDependent_GUI_DownlevelHostFxr_ErrorDialog ( )
182185 {
183186 var singleFile = sharedTestState . FrameworkDependentApp . Bundle ( ) ;
@@ -188,14 +191,14 @@ public void FrameworkDependent_GUI_DownlevelHostFxr_ErrorDialog()
188191 {
189192 string expectedErrorCode = Constants . ErrorCode . BundleExtractionFailure . ToString ( "x" ) ;
190193
191- var dotnet = new DotNetBuilder ( dotnetWithMockHostFxr . Location , TestContext . BuiltDotNet . BinPath , null )
194+ var dotnet = new DotNetBuilder ( dotnetWithMockHostFxr . Location , HostTestContext . BuiltDotNet . BinPath , null )
192195 . RemoveHostFxr ( )
193196 . AddMockHostFxr ( new Version ( 5 , 0 , 0 ) )
194197 . Build ( ) ;
195198
196199 Command command = Command . Create ( singleFile )
197200 . EnableTracingAndCaptureOutputs ( )
198- . DotNetRoot ( dotnet . BinPath , TestContext . BuildArchitecture )
201+ . DotNetRoot ( dotnet . BinPath , HostTestContext . BuildArchitecture )
199202 . Start ( ) ;
200203
201204 WindowsUtils . WaitForPopupFromProcess ( command . Process ) ;
0 commit comments