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 @@ -72,12 +72,18 @@ private async Task GrpcTemplateCore(string[] args = null)
7272
7373 await project . RunDotNetNewAsync ( "grpc" , args : args ) ;
7474
75+ var nativeAot = args ? . Contains ( ArgConstants . PublishNativeAot ) ?? false ;
7576 var expectedLaunchProfileNames = new [ ] { "http" , "https" } ;
7677 await project . VerifyLaunchSettings ( expectedLaunchProfileNames ) ;
7778
7879 await project . VerifyHasProperty ( "InvariantGlobalization" , "true" ) ;
7980
80- await project . RunDotNetPublishAsync ( ) ;
81+ // Force a restore if native AOT so that RID-specific assets are restored
82+ await project . RunDotNetPublishAsync ( noRestore : ! nativeAot ) ;
83+
84+ // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release
85+ // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build
86+ // later, while the opposite is not true.
8187
8288 await project . RunDotNetBuildAsync ( ) ;
8389
You can’t perform that action at this time.
0 commit comments