@@ -28,7 +28,7 @@ static async Task Inner(string directory, string? package, bool build)
2828 continue ;
2929 }
3030
31- await TryProcessSolution ( cache , solution , package , build ) ;
31+ await TryProcessSolution ( cache , solution , package , build , directory ) ;
3232 }
3333
3434 // Tool manifests are scanned independently of solutions, since `.config/dotnet-tools.json`
@@ -52,11 +52,11 @@ static async Task Inner(string directory, string? package, bool build)
5252 Log . Information ( "Completed in {Elapsed}" , Formatter . FormatElapsed ( totalStopwatch . Elapsed ) ) ;
5353}
5454
55- static async Task TryProcessSolution ( SourceCacheContext cache , string solution , string ? package , bool build )
55+ static async Task TryProcessSolution ( SourceCacheContext cache , string solution , string ? package , bool build , string targetDirectory )
5656{
5757 try
5858 {
59- await ProcessSolution ( cache , solution , package , build ) ;
59+ await ProcessSolution ( cache , solution , package , build , targetDirectory ) ;
6060 }
6161 catch ( Exception e )
6262 {
@@ -103,7 +103,7 @@ static async Task ProcessToolManifest(SourceCacheContext cache, string manifest,
103103 Log . Information ( " Updated in {Elapsed}" , Formatter . FormatElapsed ( stopwatch . Elapsed ) ) ;
104104}
105105
106- static async Task ProcessSolution ( SourceCacheContext cache , string solution , string ? package , bool build )
106+ static async Task ProcessSolution ( SourceCacheContext cache , string solution , string ? package , bool build , string targetDirectory )
107107{
108108 if ( Excluder . ShouldExclude ( solution ) )
109109 {
@@ -115,20 +115,19 @@ static async Task ProcessSolution(SourceCacheContext cache, string solution, str
115115
116116 var solutionDirectory = Directory . GetParent ( solution ) ! . FullName ;
117117
118- var props = Path . Combine ( solutionDirectory , "Directory.Packages.props" ) ;
119- if ( ! File . Exists ( props ) )
118+ var propsLocation = FileSystem . FindPropsFile ( solutionDirectory , targetDirectory ) ;
119+ if ( propsLocation is null )
120120 {
121121 Log . Error ( " Only central packages supported. Skipping: {Solution}" , solution ) ;
122122 return ;
123123 }
124124
125125 var stopwatch = Stopwatch . StartNew ( ) ;
126- await Updater . Update ( cache , props , package ) ;
126+ await Updater . Update ( cache , propsLocation , package ) ;
127127 Log . Information ( " Updated in {Elapsed}" , Formatter . FormatElapsed ( stopwatch . Elapsed ) ) ;
128128
129129 if ( build )
130130 {
131131 await DotnetStarter . Build ( solution ) ;
132132 }
133133}
134-
0 commit comments