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

Annotate framework assemblies as trimmable #48428

Merged
merged 2 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion eng/versioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<AssemblyMetadata Include="PreferInbox">
<Value>True</Value>
</AssemblyMetadata>
<AssemblyMetadata Include="IsTrimmable" Condition="'$(SetIsTrimmable)' != 'false'">
<Value>True</Value>
</AssemblyMetadata>
</ItemGroup>

<!-- Adds SupportedOSPlatform attribute for Windows Specific libraries -->
Expand Down Expand Up @@ -83,7 +86,7 @@
</AssemblyAttribute>

<AssemblyAttribute Include="System.Reflection.AssemblyMetadata"
Condition="'$(SkipFrameworkAssemblyMetadata)' != 'true' and '@(AssemblyMetadata)' != ''">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why are we removing the SkipFrameworkAssemblyMetadata condition?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't appear to be used.

https://github.com/dotnet/runtime/search?q=SkipFrameworkAssemblyMetadata

Also, I'm assuming it is for the case where IsTrimmable should be generated for the assembly, but someone adds SkipFrameworkAssemblyMetadata to the project. That would block IsTrimmable from getting generated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup - see also the second commit message: d03327e

Condition="'@(AssemblyMetadata)' != ''">
<_Parameter1>%(AssemblyMetadata.Identity)</_Parameter1>
<_Parameter2>%(AssemblyMetadata.Value)</_Parameter2>
</AssemblyAttribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@

[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely unrelated to this PR, but it caught my eye... is this value still desired? Should the "Framework" piece be removed?
cc: @ericstj

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[assembly: AssemblyMetadata("IsTrimmable", "True")]

[assembly: NeutralResourcesLanguage("en-US")]