Skip to content

Commit ee3cc50

Browse files
gfraiteurclaude
andcommitted
Fix all remaining dependency path resolutions for source-dependencies repos
Extract GetDependenciesBaseDirectory and GetRestoredDependencyDirectory helpers and fix all occurrences in DependenciesHelper, DependenciesConfigurationFile, DependencySource, and RestoredArtifactsNuGetConfigGenerator. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2d0e771 commit ee3cc50

File tree

4 files changed

+603
-604
lines changed

4 files changed

+603
-604
lines changed

src/PostSharp.Engineering.BuildTools/Build/Files/DependenciesConfigurationFile.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,7 @@ void WriteBuildServerSource()
471471

472472
case DependencySourceKind.RestoredDependency:
473473
{
474-
var importProjectFile = Path.GetFullPath(
475-
Path.Combine(
476-
context.RepoDirectory,
477-
"dependencies",
478-
dependency.Key,
479-
dependency.Key + ".version.props" ) );
474+
var importProjectFile = TeamCityHelper.GetRestoredDependencyVersionFile( context.RepoDirectory, dependency.Key );
480475

481476
AddImport( importProjectFile );
482477

src/PostSharp.Engineering.BuildTools/Build/Files/NuGet/RestoredArtifactsNuGetConfigGenerator.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) SharpCrafters s.r.o. See the LICENSE.md file in the root directory of this repository root for details.
22

33
using PostSharp.Engineering.BuildTools.Dependencies.Model;
4+
using PostSharp.Engineering.BuildTools.Tools.TeamCity;
45
using System.IO;
56

67
namespace PostSharp.Engineering.BuildTools.Build.Files.NuGet;
@@ -36,12 +37,9 @@ protected override string GetDependencyDirectory(
3637
DependencyDefinition dependencyDefinition,
3738
BuildConfiguration configuration )
3839
{
39-
// For restored artifacts, dependencies are always under dependencies/<name>
40+
// For restored artifacts, dependencies are under the dependencies base directory
4041
// TeamCity artifact rule +:{PrivateArtifactsDir}/**/* => dependencies/{name} copies the contents directly
41-
return Path.Combine(
42-
context.RepoDirectory,
43-
"dependencies",
44-
dependencyKey );
42+
return TeamCityHelper.GetRestoredDependencyDirectory( context.RepoDirectory, dependencyKey );
4543
}
4644

4745
protected override bool ShouldIncludeDependency( DependencyDefinition dependencyDefinition )

0 commit comments

Comments
 (0)