File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/ProjectTemplates/test/Templates.Tests Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,18 @@ private async Task GrpcTemplateCore(string[] args = null)
7676
7777 await project . RunDotNetNewAsync ( "grpc" , args : args ) ;
7878
79+ var nativeAot = args ? . Contains ( ArgConstants . PublishNativeAot ) ?? false ;
7980 var expectedLaunchProfileNames = new [ ] { "http" , "https" } ;
8081 await project . VerifyLaunchSettings ( expectedLaunchProfileNames ) ;
8182
8283 await project . VerifyHasProperty ( "InvariantGlobalization" , "true" ) ;
8384
84- await project . RunDotNetPublishAsync ( ) ;
85+ // Force a restore if native AOT so that RID-specific assets are restored
86+ await project . RunDotNetPublishAsync ( noRestore : ! nativeAot ) ;
87+
88+ // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release
89+ // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build
90+ // later, while the opposite is not true.
8591
8692 await project . RunDotNetBuildAsync ( ) ;
8793
You can’t perform that action at this time.
0 commit comments