Skip to content

Commit 192fd18

Browse files
committed
Code gen
1 parent 136903d commit 192fd18

File tree

5 files changed

+58
-6
lines changed

5 files changed

+58
-6
lines changed

eng/CodeGen.proj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<ItemGroup>
2424
<_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'true')->Distinct())" />
2525
<_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'false')->Distinct())" />
26+
<_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('Trimmable', 'true')->Distinct())" />
2627
</ItemGroup>
2728

2829
<PropertyGroup>
@@ -73,6 +74,29 @@
7374

7475
<WriteLinesToFile File="$(SharedFxDepList)" Lines="$(SharedFxDepListContent)" Overwrite="true" />
7576
<Message Importance="High" Text="Generated $(SharedFxDepList)" />
77+
78+
<PropertyGroup>
79+
<TrimmableProjectsList>$(MSBuildThisFileDirectory)TrimmableProjects.props</TrimmableProjectsList>
80+
<TrimmableProjectsListContent>
81+
<![CDATA[
82+
<!--
83+
This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.
84+
85+
This file contains a complete list of projects annotated for trimming.
86+
87+
This project is generated using the <Trimmable> properties from each .csproj in this repository.
88+
-->
89+
<Project>
90+
<ItemGroup>
91+
@(_TrimmableProject->'<TrimmableProject Include="%(Identity)" />', '%0A ')
92+
</ItemGroup>
93+
</Project>
94+
]]>
95+
</TrimmableProjectsListContent>
96+
</PropertyGroup>
97+
98+
<WriteLinesToFile File="$(TrimmableProjectsList)" Lines="$(TrimmableProjectsListContent)" Overwrite="true" />
99+
<Message Importance="High" Text="Generated $(TrimmableProjectsList)" />
76100
</Target>
77101

78102
</Project>

eng/TrimmableProjects.props

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--
2+
This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.
3+
4+
This file contains a complete list of projects annotated for trimming.
5+
6+
This project is generated using the <Trimmable> properties from each .csproj in this repository.
7+
-->
8+
<Project>
9+
<ItemGroup>
10+
<TrimmableProject Include="Microsoft.Net.Http.Headers" />
11+
<TrimmableProject Include="Microsoft.AspNetCore.Http.Features" />
12+
<TrimmableProject Include="Microsoft.AspNetCore.Metadata" />
13+
<TrimmableProject Include="Microsoft.AspNetCore.WebUtilities" />
14+
<TrimmableProject Include="Microsoft.AspNetCore.Authorization" />
15+
<TrimmableProject Include="Microsoft.AspNetCore.Components.Authorization" />
16+
<TrimmableProject Include="Microsoft.AspNetCore.Components" />
17+
<TrimmableProject Include="Microsoft.AspNetCore.Components.Forms" />
18+
<TrimmableProject Include="Microsoft.Authentication.WebAssembly.Msal" />
19+
<TrimmableProject Include="Microsoft.JSInterop.WebAssembly" />
20+
<TrimmableProject Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" />
21+
<TrimmableProject Include="Microsoft.AspNetCore.Components.WebAssembly" />
22+
<TrimmableProject Include="Microsoft.AspNetCore.Components.Web" />
23+
<TrimmableProject Include="Microsoft.Extensions.ObjectPool" />
24+
<TrimmableProject Include="Microsoft.JSInterop" />
25+
<TrimmableProject Include="Microsoft.Extensions.Features" />
26+
</ItemGroup>
27+
</Project>

eng/targets/ResolveReferences.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@
316316
<IsAspNetCoreApp>$([MSBuild]::ValueOrDefault($(IsAspNetCoreApp),'false'))</IsAspNetCoreApp>
317317
<IsPackable>$([MSBuild]::ValueOrDefault($(IsPackable),'false'))</IsPackable>
318318
<ProjectFileRelativePath>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)))</ProjectFileRelativePath>
319+
<Trimmable>$([MSBuild]::ValueOrDefault($(Trimmable),'false'))</Trimmable>
319320
</ProvidesReference>
320321
</ItemGroup>
321322
</Target>

src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Microsoft.AspNetCore.Http.HttpResponse</Description>
1313
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1414
<PackageTags>aspnetcore</PackageTags>
1515
<IsPackable>false</IsPackable>
16-
<Trimmable>true</Trimmable>
1716
</PropertyGroup>
1817

1918
<ItemGroup>

src/Tools/LinkabilityChecker/LinkabilityChecker.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
<IsPackable>false</IsPackable>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
7+
8+
<Import Project="$(RepoRoot)eng\TrimmableProjects.props" />
9+
710
<ItemGroup>
8-
<Reference Include="Microsoft.Net.Http.Headers" />
9-
<Reference Include="Microsoft.AspNetCore.WebUtilities" />
10-
<Reference Include="Microsoft.Extensions.Features" />
11-
<Reference Include="Microsoft.Extensions.ObjectPool" />
12-
<Reference Include="Microsoft.AspNetCore.Http.Features" />
11+
<Reference Include="@(TrimmableProject)" />
12+
</ItemGroup>
1313

14+
<ItemGroup>
1415
<!-- Packages required to produce a complete dependency graph for the trimmer -->
1516
<Reference Include="System.Security.Permissions" />
1617
<Reference Include="System.Threading.AccessControl" />

0 commit comments

Comments
 (0)