@@ -90,15 +90,15 @@ var nuke when nuke.TryGetValue("NUKE_RUN_ID", out var nukeid) => nukeid,
9090 _ => null
9191 } ;
9292
93- [ Solution ] public readonly Solution Solution = default ! ;
93+ [ Solution ( GenerateProjects = true ) ] public readonly Solution Solution = default ! ;
9494 [ GitRepository ] private readonly GitRepository _gitRepository = default ! ;
9595
9696 private GitVersion _gitVersion = default ! ;
9797
9898 private static AbsolutePath SourceDirectory => RootDirectory / "src" ;
9999 private static AbsolutePath TestDirectory => RootDirectory / "test" ;
100100 private static AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts" ;
101- private Project [ ] TestProjects => Solution . GetAllProjects ( "*.UTs" ) . ToArray ( ) ;
101+ private Project [ ] TestProjects => [ .. Solution . test . Projects ] ;
102102
103103 //private const string MASTER_BRANCH = "master";
104104 private const string DEVELOP_BRANCH = "develop" ;
@@ -287,7 +287,7 @@ protected override void OnBuildInitialized()
287287 {
288288 //A runtime dependant version is also currently generated by default and exposed to CI artifacts
289289 PublishApp (
290- projectName : "Demo.Engine" ) ;
290+ Solution . src . Demo_Engine ) ;
291291
292292 //We generate a self contained, "one file", trimmed version for Windows x64 by default
293293 //Any other can be generated as well, but aren't currently supported so aren't exposed to CI artifacts
@@ -300,7 +300,7 @@ protected override void OnBuildInitialized()
300300 foreach ( var rid in rids )
301301 {
302302 PublishApp (
303- projectName : "Demo.Engine" ,
303+ Solution . src . Demo_Engine ,
304304 rid : rid ) ;
305305 }
306306 } ) ;
@@ -346,30 +346,23 @@ protected override void OnBuildInitialized()
346346 ) ;
347347 } ) ;
348348
349- private void PublishApp ( string projectName , string ? rid = null , bool zipProject = true )
349+ private void PublishApp ( Project project , string ? rid = null , bool zipProject = true )
350350 {
351351 AbsolutePath outputDir ;
352352 if ( string . IsNullOrEmpty ( rid ) )
353353 {
354- outputDir = ArtifactsDirectory / projectName ;
355- Log . Information ( $ "Publishing { projectName } into { outputDir } ") ;
354+ outputDir = ArtifactsDirectory / project . Name ;
355+ Log . Information ( $ "Publishing { project . Name } into { outputDir } ") ;
356356 }
357357 else
358358 {
359- outputDir = ArtifactsDirectory / $ "{ projectName } .{ rid } ";
360- Log . Information ( $ "Publishing { projectName } for { rid } into { outputDir } ") ;
359+ outputDir = ArtifactsDirectory / $ "{ project . Name } .{ rid } ";
360+ Log . Information ( $ "Publishing { project . Name } for { rid } into { outputDir } ") ;
361361 }
362362
363363 _ = DotNetPublish ( t => t
364364 . SetProject (
365- /* This doesn't work, because Demo.Engine is in a solution folder
366- * And Solution.GetProject only searches through projects that are directly in the Solution
367- * */
368- //Solution.GetProject(projectName))
369- v : Solution
370- . AllProjects
371- . Single ( project
372- => project . Name . Equals ( projectName , StringComparison . Ordinal ) ) )
365+ v : project )
373366 . SetConfiguration ( Configuration )
374367 //.SetProperty("Platform", platform)
375368 . SetAssemblyVersion ( _gitVersion . AssemblySemVer )
0 commit comments