@@ -248,7 +248,7 @@ class AppUpdateHandler
248
248
await App . AssertOutputLineStartsWith ( "Updated" ) ;
249
249
250
250
await App . WaitUntilOutputContains (
251
- "dotnet watch ⚠ [WatchHotReloadApp (net9.0 )] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'AppUpdateHandler, WatchHotReloadApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' but neither exists." ) ;
251
+ $ "dotnet watch ⚠ [WatchHotReloadApp ({ ToolsetInfo . CurrentTargetFramework } )] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'AppUpdateHandler, WatchHotReloadApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' but neither exists.") ;
252
252
}
253
253
254
254
[ Theory ]
@@ -287,11 +287,11 @@ class AppUpdateHandler
287
287
288
288
await App . AssertOutputLineStartsWith ( "Updated" ) ;
289
289
290
- await App . WaitUntilOutputContains ( "dotnet watch ⚠ [WatchHotReloadApp (net9.0 )] Exception from 'System.Action`1[System.Type[]]': System.InvalidOperationException: Bug!" ) ;
290
+ await App . WaitUntilOutputContains ( $ "dotnet watch ⚠ [WatchHotReloadApp ({ ToolsetInfo . CurrentTargetFramework } )] Exception from 'System.Action`1[System.Type[]]': System.InvalidOperationException: Bug!") ;
291
291
292
292
if ( verbose )
293
293
{
294
- await App . WaitUntilOutputContains ( "dotnet watch 🕵️ [WatchHotReloadApp (net9.0 )] Deltas applied." ) ;
294
+ await App . WaitUntilOutputContains ( $ "dotnet watch 🕵️ [WatchHotReloadApp ({ ToolsetInfo . CurrentTargetFramework } )] Deltas applied.") ;
295
295
}
296
296
else
297
297
{
@@ -347,7 +347,7 @@ public async Task BlazorWasm(bool projectSpecifiesCapabilities)
347
347
""" ;
348
348
349
349
UpdateSourceFile ( Path . Combine ( testAsset . Path , "Pages" , "Index.razor" ) , newSource ) ;
350
- await App . AssertOutputLineStartsWith ( MessageDescriptor . HotReloadSucceeded , "blazorwasm (net9.0 )" ) ;
350
+ await App . AssertOutputLineStartsWith ( MessageDescriptor . HotReloadSucceeded , $ "blazorwasm ({ ToolsetInfo . CurrentTargetFramework } )") ;
351
351
352
352
// check project specified capapabilities:
353
353
if ( projectSpecifiesCapabilities )
@@ -410,8 +410,8 @@ public async Task Razor_Component_ScopedCssAndStaticAssets()
410
410
await App . AssertOutputLineStartsWith ( "dotnet watch 🔥 Hot reload change handled" ) ;
411
411
412
412
App . AssertOutputContains ( $ "dotnet watch ⌚ Handling file change event for scoped css file { scopedCssPath } .") ;
413
- App . AssertOutputContains ( $ "dotnet watch ⌚ [RazorClassLibrary (net9.0 )] No refresh server.") ;
414
- App . AssertOutputContains ( $ "dotnet watch ⌚ [RazorApp (net9.0 )] Refreshing browser.") ;
413
+ App . AssertOutputContains ( $ "dotnet watch ⌚ [RazorClassLibrary ({ ToolsetInfo . CurrentTargetFramework } )] No refresh server.") ;
414
+ App . AssertOutputContains ( $ "dotnet watch ⌚ [RazorApp ({ ToolsetInfo . CurrentTargetFramework } )] Refreshing browser.") ;
415
415
App . AssertOutputContains ( $ "dotnet watch 🔥 Hot reload of scoped css succeeded.") ;
416
416
App . AssertOutputContains ( $ "dotnet watch ⌚ No C# changes to apply.") ;
417
417
App . Process . ClearOutput ( ) ;
@@ -422,7 +422,7 @@ public async Task Razor_Component_ScopedCssAndStaticAssets()
422
422
await App . AssertOutputLineStartsWith ( "dotnet watch 🔥 Hot reload change handled" ) ;
423
423
424
424
App . AssertOutputContains ( $ "dotnet watch ⌚ Sending static file update request for asset 'app.css'.") ;
425
- App . AssertOutputContains ( $ "dotnet watch ⌚ [RazorApp (net9.0 )] Refreshing browser.") ;
425
+ App . AssertOutputContains ( $ "dotnet watch ⌚ [RazorApp ({ ToolsetInfo . CurrentTargetFramework } )] Refreshing browser.") ;
426
426
App . AssertOutputContains ( $ "dotnet watch 🔥 Hot Reload of static files succeeded.") ;
427
427
App . AssertOutputContains ( $ "dotnet watch ⌚ No C# changes to apply.") ;
428
428
App . Process . ClearOutput ( ) ;
@@ -620,6 +620,7 @@ public static void PrintDirectoryName([CallerFilePathAttribute] string filePath
620
620
[ Fact ]
621
621
public async Task Aspire ( )
622
622
{
623
+ var tfm = ToolsetInfo . CurrentTargetFramework ;
623
624
var testAsset = TestAssets . CopyTestAsset ( "WatchAspire" )
624
625
. WithSource ( ) ;
625
626
@@ -645,8 +646,8 @@ public async Task Aspire()
645
646
await App . AssertOutputLineStartsWith ( "dotnet watch 🔥 Hot reload change handled" ) ;
646
647
647
648
App . AssertOutputContains ( "Using Aspire process launcher." ) ;
648
- App . AssertOutputContains ( MessageDescriptor . HotReloadSucceeded , "WatchAspire.AppHost (net9.0 )" ) ;
649
- App . AssertOutputContains ( MessageDescriptor . HotReloadSucceeded , "WatchAspire.ApiService (net9.0 )" ) ;
649
+ App . AssertOutputContains ( MessageDescriptor . HotReloadSucceeded , $ "WatchAspire.AppHost ({ tfm } )") ;
650
+ App . AssertOutputContains ( MessageDescriptor . HotReloadSucceeded , $ "WatchAspire.ApiService ({ tfm } )") ;
650
651
651
652
// Only one browser should be launched (dashboard). The child process shouldn't launch a browser.
652
653
Assert . Equal ( 1 , App . Process . Output . Count ( line => line . StartsWith ( "dotnet watch ⌚ Launching browser: " ) ) ) ;
@@ -672,16 +673,16 @@ public async Task Aspire()
672
673
// We don't have means to gracefully terminate process on Windows, see https://github.com/dotnet/runtime/issues/109432
673
674
if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
674
675
{
675
- App . AssertOutputContains ( "dotnet watch ❌ [WatchAspire.ApiService (net9.0 )] Exited with error code -1" ) ;
676
+ App . AssertOutputContains ( $ "dotnet watch ❌ [WatchAspire.ApiService ({ tfm } )] Exited with error code -1") ;
676
677
}
677
678
else
678
679
{
679
680
// Unix process may return exit code = 128 + SIGTERM
680
- // dotnet watch ❌ [WatchAspire.ApiService (net9.0)] Exited with error code 143
681
- App . AssertOutputContains ( "[WatchAspire.ApiService (net9.0 )] Exited" ) ;
681
+ // Exited with error code 143
682
+ App . AssertOutputContains ( $ "[WatchAspire.ApiService ({ tfm } )] Exited") ;
682
683
}
683
684
684
- App . AssertOutputContains ( $ "dotnet watch ⌚ Building ' { serviceProjectPath } ' ...") ;
685
+ App . AssertOutputContains ( $ "dotnet watch ⌚ Building { serviceProjectPath } ...") ;
685
686
App . AssertOutputContains ( "error CS0246: The type or namespace name 'WeatherForecast' could not be found" ) ;
686
687
App . Process . ClearOutput ( ) ;
687
688
@@ -690,9 +691,9 @@ public async Task Aspire()
690
691
serviceSourcePath ,
691
692
originalSource . Replace ( "WeatherForecast" , "WeatherForecast2" ) ) ;
692
693
693
- await App . AssertOutputLineStartsWith ( "dotnet watch ⌚ [WatchAspire.ApiService (net9.0 )] Capabilities" ) ;
694
+ await App . AssertOutputLineStartsWith ( $ "dotnet watch ⌚ [WatchAspire.ApiService ({ tfm } )] Capabilities") ;
694
695
695
- App . AssertOutputContains ( "dotnet watch ⌚ Build succeeded. " ) ;
696
+ App . AssertOutputContains ( $ "dotnet watch 🔨 Build succeeded: { serviceProjectPath } ") ;
696
697
App . AssertOutputContains ( "dotnet watch 🔥 Project baselines updated." ) ;
697
698
App . AssertOutputContains ( $ "dotnet watch ⭐ Starting project: { serviceProjectPath } ") ;
698
699
@@ -703,15 +704,15 @@ public async Task Aspire()
703
704
// We don't have means to gracefully terminate process on Windows, see https://github.com/dotnet/runtime/issues/109432
704
705
if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
705
706
{
706
- await App . AssertOutputLineStartsWith ( "dotnet watch ❌ [WatchAspire.ApiService (net9.0 )] Exited with error code -1" ) ;
707
- await App . AssertOutputLineStartsWith ( "dotnet watch ❌ [WatchAspire.AppHost (net9.0 )] Exited with error code -1" ) ;
707
+ await App . AssertOutputLineStartsWith ( $ "dotnet watch ❌ [WatchAspire.ApiService ({ tfm } )] Exited with error code -1") ;
708
+ await App . AssertOutputLineStartsWith ( $ "dotnet watch ❌ [WatchAspire.AppHost ({ tfm } )] Exited with error code -1") ;
708
709
}
709
710
else
710
711
{
711
712
// Unix process may return exit code = 128 + SIGTERM
712
- // dotnet watch ❌ [WatchAspire.ApiService (net9.0)] Exited with error code 143
713
- await App . AssertOutputLine ( line => line . Contains ( "[WatchAspire.ApiService (net9.0 )] Exited" ) , failure : _ => false ) ;
714
- await App . AssertOutputLine ( line => line . Contains ( "[WatchAspire.AppHost (net9.0 )] Exited" ) , failure : _ => false ) ;
713
+ // Exited with error code 143
714
+ await App . AssertOutputLine ( line => line . Contains ( $ "[WatchAspire.ApiService ({ tfm } )] Exited") , failure : _ => false ) ;
715
+ await App . AssertOutputLine ( line => line . Contains ( $ "[WatchAspire.AppHost ({ tfm } )] Exited") , failure : _ => false ) ;
715
716
}
716
717
717
718
await App . AssertOutputLineStartsWith ( "dotnet watch ⭐ Waiting for server to shutdown ..." ) ;
0 commit comments