Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit da998fc

Browse files
committed
[MSBuild] Allow reference paths to be specified for api intersection
<PropertyGroup> <IntersectionAssemblyReferencePath>Path1;Path2<IntersectionAssemblyReferencePath> </PropertyGroup>
1 parent defabfd commit da998fc

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/Build/NuGet.Build.Packaging.Tasks/ApiIntersect.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class ApiIntersect : ToolTask
1515
[Required]
1616
public ITaskItem[] IntersectionAssembly { get; set; }
1717

18+
public ITaskItem[] ReferencePath { get; set; }
19+
1820
[Required]
1921
public ITaskItem RootOutputDirectory { get; set; }
2022

@@ -56,6 +58,12 @@ protected override string GenerateCommandLineCommands()
5658
builder.AppendFileNameIfNotNull(assembly.ItemSpec);
5759
}
5860

61+
foreach (var referencePath in ReferencePath.NullAsEmpty())
62+
{
63+
builder.AppendSwitch("-r");
64+
builder.AppendFileNameIfNotNull(referencePath.ItemSpec);
65+
}
66+
5967
return builder.ToString();
6068
}
6169

src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ Copyright (c) .NET Foundation. All rights reserved.
521521
Framework="%(ReferenceAssemblyFramework.Identity)"
522522
RootOutputDirectory="$(IntermediateOutputPath)"
523523
IntersectionAssembly="@(IntersectionAssembly)"
524+
ReferencePath="$(IntersectionAssemblyReferencePath)"
524525
ToolPath="$(ApiIntersectToolPath)"
525526
ToolExe="$(ApiIntersectToolExe)">
526527
<Output TaskParameter="OutputDirectory" ItemName="_ReferenceAssemblyBuildInfo" />

0 commit comments

Comments
 (0)