Skip to content

Commit

Permalink
Prevent restoring illink for native-binplace.proj (dotnet#92289)
Browse files Browse the repository at this point in the history
Fixes dotnet#92194. The
reference to illink from `native-binplace.proj`, built as a
reference of `build-native.proj`, was hitting a nuget bug with
static graph restore. The bug seems to be specific to something
about the project file (maybe the language-specific targets,
since `native-binplace.proj` imports the `Microsoft.NET.Sdk`, but
doesn't have a `csproj` extension).

Fixed by explicitly marking this as not a source project, which
will prevent the import of illink.targets.
  • Loading branch information
sbomer authored Sep 20, 2023
1 parent b049f42 commit fcf7b11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
we only enable it in specific projects. so to avoid duplicating this property in coreclr, we can first scope it to src/libraries.
This property needs to be declared before the ..\..\Directory.Build.props import. -->
<SkipArcadeNoWarnCS1591>true</SkipArcadeNoWarnCS1591>

<!-- Prevent native-binplace.proj from being treated as a source project, to avoid importing illink targets
and thereby avoid hitting a static graph restore bug: https://github.com/dotnet/runtime/issues/92194 -->
<IsSourceProject Condition="'$(MSBuildProjectFile)' == 'native-binplace.proj'">false</IsSourceProject>
</PropertyGroup>

<Import Project="..\..\Directory.Build.props" />
Expand Down

0 comments on commit fcf7b11

Please sign in to comment.