Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code gen #40383

Closed
wants to merge 3 commits into from
Closed

Code gen #40383

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions eng/CodeGen.proj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ItemGroup>
<_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'true')->Distinct())" />
<_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'false')->Distinct())" />
<_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('Trimmable', 'true')->Distinct())" />
</ItemGroup>

<PropertyGroup>
Expand Down Expand Up @@ -73,6 +74,29 @@

<WriteLinesToFile File="$(SharedFxDepList)" Lines="$(SharedFxDepListContent)" Overwrite="true" />
<Message Importance="High" Text="Generated $(SharedFxDepList)" />

<PropertyGroup>
<TrimmableProjectsList>$(MSBuildThisFileDirectory)TrimmableProjects.props</TrimmableProjectsList>
<TrimmableProjectsListContent>
<![CDATA[
<!--
This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.

This file contains a complete list of projects annotated for trimming.

This project is generated using the <Trimmable> properties from each .csproj in this repository.
pranavkm marked this conversation as resolved.
Show resolved Hide resolved
-->
<Project>
<ItemGroup>
@(_TrimmableProject->'<TrimmableProject Include="%(Identity)" />', '%0A ')
</ItemGroup>
</Project>
]]>
</TrimmableProjectsListContent>
</PropertyGroup>

<WriteLinesToFile File="$(TrimmableProjectsList)" Lines="$(TrimmableProjectsListContent)" Overwrite="true" />
<Message Importance="High" Text="Generated $(TrimmableProjectsList)" />
</Target>

</Project>
27 changes: 27 additions & 0 deletions eng/TrimmableProjects.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.

This file contains a complete list of projects annotated for trimming.

This project is generated using the <Trimmable> properties from each .csproj in this repository.
-->
<Project>
<ItemGroup>
<TrimmableProject Include="Microsoft.Net.Http.Headers" />
<TrimmableProject Include="Microsoft.AspNetCore.Http.Features" />
<TrimmableProject Include="Microsoft.AspNetCore.Metadata" />
<TrimmableProject Include="Microsoft.AspNetCore.WebUtilities" />
<TrimmableProject Include="Microsoft.AspNetCore.Authorization" />
<TrimmableProject Include="Microsoft.AspNetCore.Components.Authorization" />
<TrimmableProject Include="Microsoft.AspNetCore.Components" />
<TrimmableProject Include="Microsoft.AspNetCore.Components.Forms" />
<TrimmableProject Include="Microsoft.Authentication.WebAssembly.Msal" />
<TrimmableProject Include="Microsoft.JSInterop.WebAssembly" />
<TrimmableProject Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" />
<TrimmableProject Include="Microsoft.AspNetCore.Components.WebAssembly" />
<TrimmableProject Include="Microsoft.AspNetCore.Components.Web" />
<TrimmableProject Include="Microsoft.Extensions.ObjectPool" />
<TrimmableProject Include="Microsoft.JSInterop" />
<TrimmableProject Include="Microsoft.Extensions.Features" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions eng/targets/ResolveReferences.targets
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@
<IsAspNetCoreApp>$([MSBuild]::ValueOrDefault($(IsAspNetCoreApp),'false'))</IsAspNetCoreApp>
<IsPackable>$([MSBuild]::ValueOrDefault($(IsPackable),'false'))</IsPackable>
<ProjectFileRelativePath>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)))</ProjectFileRelativePath>
<Trimmable>$([MSBuild]::ValueOrDefault($(Trimmable),'false'))</Trimmable>
</ProvidesReference>
</ItemGroup>
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Microsoft.AspNetCore.Http.HttpResponse</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore</PackageTags>
<IsPackable>false</IsPackable>
<Trimmable>true</Trimmable>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 6 additions & 5 deletions src/Tools/LinkabilityChecker/LinkabilityChecker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="$(RepoRoot)eng\TrimmableProjects.props" />

<ItemGroup>
<Reference Include="Microsoft.Net.Http.Headers" />
<Reference Include="Microsoft.AspNetCore.WebUtilities" />
<Reference Include="Microsoft.Extensions.Features" />
<Reference Include="Microsoft.Extensions.ObjectPool" />
<Reference Include="Microsoft.AspNetCore.Http.Features" />
<Reference Include="@(TrimmableProject)" />
</ItemGroup>

<ItemGroup>
<!-- Packages required to produce a complete dependency graph for the trimmer -->
<Reference Include="System.Security.Permissions" />
<Reference Include="System.Threading.AccessControl" />
Expand Down