Skip to content

Commit 7e977dc

Browse files
authored
ILCompiler.pkgproj: remove 'runtime.json' when DotNetBuildSourceOnly. (#102908)
1 parent 899c766 commit 7e977dc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
<PropertyGroup>
44
<GeneratePackage>true</GeneratePackage>
55
<PackageDescription>Provides a native AOT compiler and runtime for .NET</PackageDescription>
6+
7+
<!-- Microsoft.DotNet.ILCompiler includes a 'runtime.json' file that per rid
8+
references the corresponding 'runtime.<rid>.Microsoft.DotNet.ILCompiler' package for restore.
9+
10+
With a source-built SDK, we support bundling the source-built 'runtime.<rid>.Microsoft.DotNet.ILCompiler'
11+
package as a pack. Since packs can not be restored by NuGet, the 'runtime.json' reference for the
12+
source-built rid leads to NuGet restore errors.
13+
14+
To work around these errors we remove the 'runtime.json' file completely on the source-built SDK.
15+
'ProcessFrameworkReferences' is responsible for either picking up the bundled pack (when targetting the source-built rid)
16+
or to add a 'runtime.<rid>.Microsoft.DotNet.ILCompiler' package for download. -->
17+
<IncludeRuntimeJson Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</IncludeRuntimeJson>
18+
<!-- Set 'ExcludeLineupReference' to avoid package dependencies due to disabling 'runtime.json'. -->
19+
<ExcludeLineupReference Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</ExcludeLineupReference>
620
</PropertyGroup>
721

822
<Target Name="GetIlcCompilerFiles"

0 commit comments

Comments
 (0)