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)
72
72
73
73
await project . RunDotNetNewAsync ( "grpc" , args : args ) ;
74
74
75
+ var nativeAot = args ? . Contains ( ArgConstants . PublishNativeAot ) ?? false ;
75
76
var expectedLaunchProfileNames = new [ ] { "http" , "https" } ;
76
77
await project . VerifyLaunchSettings ( expectedLaunchProfileNames ) ;
77
78
78
79
await project . VerifyHasProperty ( "InvariantGlobalization" , "true" ) ;
79
80
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.
81
87
82
88
await project . RunDotNetBuildAsync ( ) ;
83
89
You can’t perform that action at this time.
0 commit comments