Skip to content

Commit 3da1389

Browse files
hoyosjsJeremy Koritzinsky
andauthored
Rework bootstrap layout usage for AOT publish of cdac project (#122471)
The cdac was setting a slew of properties that had cascading effects on the bootstrap targetting pack logic. Simplify this to only kick in when using AOT publishing in-build. --------- Co-authored-by: Jeremy Koritzinsky <Jeremy.Koritzinsky@microsoft.com>
1 parent 9c03d9c commit 3da1389

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

eng/targetingpacks.targets

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
<TargetingpacksTargetsImported>true</TargetingpacksTargetsImported>
1717
</PropertyGroup>
1818

19-
<PropertyGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' and
20-
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
21-
'$(TargetFrameworkVersion)' == 'v$(NetCoreAppCurrentVersion)'">
19+
<PropertyGroup Condition="('$(DisableImplicitFrameworkReferences)' != 'true' and
20+
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
21+
'$(TargetFrameworkVersion)' == 'v$(NetCoreAppCurrentVersion)')
22+
or '$(UseBootstrapLayout)' == 'true'">
2223
<UseLocalTargetingRuntimePack Condition="'$(UseLocalTargetingRuntimePack)' == ''">true</UseLocalTargetingRuntimePack>
2324
</PropertyGroup>
2425

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project>
22
<Import Project="..\..\..\Directory.Build.props" />
3-
<Import Project=".\native-library.props" Condition="'$(IsSourceProject)' == 'true' and '$(Language)' == 'C#'" />
3+
<PropertyGroup>
44

5-
<PropertyGroup Condition="'$(UseBootstrapLayout)' == 'true'">
6-
<UseLocalTargetingRuntimePack>true</UseLocalTargetingRuntimePack>
5+
<UseBootstrapLayout Condition="'$(NeedsAotPublish)' == 'true' and '$(UseBootstrap)' == 'true'">true</UseBootstrapLayout>
76
</PropertyGroup>
7+
8+
<Import Project=".\native-library.props" Condition="'$(NeedsAotPublish)' == 'true'" />
89
</Project>

src/native/managed/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
2-
<Import Project=".\native-library.targets" Condition="'$(IsSourceProject)' == 'true' and '$(Language)' == 'C#'" />
2+
<Import Project=".\native-library.targets" Condition="'$(NeedsAotPublish)' == 'true'" />
33
<Import Project="..\..\..\Directory.Build.targets" />
44
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(UseBootstrapLayout)' == 'true'" />
55
<Import Project="$(RepositoryEngineeringDir)liveILLink.targets" Condition="'$(UseBootstrapLayout)' == 'true'" />

src/native/managed/cdac/mscordaccore_universal/mscordaccore_universal.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project>
2+
<PropertyGroup>
3+
<NeedsAotPublish>true</NeedsAotPublish>
4+
</PropertyGroup>
25

6+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
37
<PropertyGroup>
48
<AssemblyName>$(LibPrefix)$(MSBuildProjectName)</AssemblyName>
59
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
@@ -32,4 +36,5 @@
3236
<ProjectReference Include="..\Microsoft.Diagnostics.DataContractReader.Legacy\Microsoft.Diagnostics.DataContractReader.Legacy.csproj" />
3337
</ItemGroup>
3438

39+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
3540
</Project>

src/native/managed/subproject.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<SubprojectProps Include="RuntimeConfiguration" Value="$(RuntimeConfiguration)" />
66
<SubprojectProps Include="LibrariesConfiguration" Value="$(LibrariesConfiguration)" />
77
<SubprojectProps Include="RuntimeIdentifier" Value="$(PortableTargetRid)" />
8-
<SubprojectProps Include="UseBootstrapLayout" Value="$(UseBootstrap)" />
98
</ItemGroup>
109

1110
<PropertyGroup>

0 commit comments

Comments
 (0)