From a9046411dc0816ad566d230a2cf2a2aa784481c1 Mon Sep 17 00:00:00 2001
From: Sven Boemer <sbomer@gmail.com>
Date: Mon, 10 Jun 2024 22:43:19 +0000
Subject: [PATCH] Fix Microsoft.NET.ILLink package

By removing dependency on ILCompiler.DependencyAnalysisFramework.
---
 src/tools/illink/src/linker/Mono.Linker.csproj | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/tools/illink/src/linker/Mono.Linker.csproj b/src/tools/illink/src/linker/Mono.Linker.csproj
index 24c4eba87ef35e..8241ceb22e40ad 100644
--- a/src/tools/illink/src/linker/Mono.Linker.csproj
+++ b/src/tools/illink/src/linker/Mono.Linker.csproj
@@ -77,7 +77,9 @@
   </ItemGroup>
 
   <ItemGroup>
-    <ProjectReference Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.DependencyAnalysisFramework\ILCompiler.DependencyAnalysisFramework.csproj" />
+    <!-- PrivateAssets prevents ILCompiler.DependencyAnalysisFramework from becoming a dependency of the Microsoft.NET.ILLink package, which is designed to
+         be referenced by custom step authors as the public surface available to custom steps (which should not use the dependency analysis framework). -->
+    <ProjectReference Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.DependencyAnalysisFramework\ILCompiler.DependencyAnalysisFramework.csproj" PrivateAssets="All" />
   </ItemGroup>
 
   <ItemGroup>