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

Enable Trimming on FileProviders.Embedded #47322

Merged
merged 3 commits into from
Mar 20, 2023

Conversation

eerhardt
Copy link
Member

The FileProviders.Embedded assembly wasn't marked as trimmable, and wasn't getting analyzers run on it. Enable the analyzers and fix the warnings.

Clean up items:

  • Capture the result of Assembly.Location in a variable because it allocates a string every time it is called.
  • Remove the TrimmingAttributes.cs file from AspNetCore.Identity because the assembly only builds for DefaultNetCoreTargetFramework.

The FileProviders.Embedded assembly wasn't marked as trimmable, and wasn't getting analyzers run on it. Enable the analyzers and fix the warnings.

Clean up items:
- Capture the result of Assembly.Location in a variable because it allocates a string every time it is called.
- Remove the TrimmingAttributes.cs file from AspNetCore.Identity because the assembly only builds for DefaultNetCoreTargetFramework.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-identity Includes: Identity and providers label Mar 20, 2023
Also fix CodeGen.proj to use Environment.NewLine, so it doesn't make unnecessary diffs on Windows machines.
@eerhardt eerhardt requested review from a team and wtgodbe as code owners March 20, 2023 19:07
Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

Seems reasonable.

@eerhardt eerhardt merged commit 46d1c24 into dotnet:main Mar 20, 2023
@ghost ghost added this to the 8.0-preview3 milestone Mar 20, 2023
@eerhardt eerhardt deleted the EmbeddedFileProvidersTrimming branch March 20, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-identity Includes: Identity and providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants