Skip to content

Fix PublishAot single warning issue for ProjectReferences #101799

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

Merged
merged 1 commit into from
May 2, 2024

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented May 2, 2024

When publishing for native AOT and a ProjectReference has trim/AOT warnings, all the warnings are being collapsed into a single "warning IL2104: Assembly 'X' produced trim warnings."

The issue is that we are using FileName, which cuts off the file extension of the item. But the items we are working with already cut off the .dll extension, so it this is cutting off important parts of the assembly name. The fix is to just use Identity, which is the whole item id.

When publishing for native AOT and a ProjectReference has trim/AOT warnings, all the warnings are being collapsed into a single "warning IL2104: Assembly 'X' produced trim warnings."

The issue is that we are using FileName, which cuts off the file extension of the item. But the items we are working with already cut off the `.dll` extension, so it this is cutting off important parts of the assembly name. The fix is to just use Identity, which is the whole item id.
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thank you!

@MichalStrehovsky MichalStrehovsky merged commit 40c024f into dotnet:main May 2, 2024
@eerhardt eerhardt deleted the FixNativeAOTNoSingleWarn branch May 2, 2024 20:50
michaelgsharp pushed a commit to michaelgsharp/runtime that referenced this pull request May 9, 2024
)

When publishing for native AOT and a ProjectReference has trim/AOT warnings, all the warnings are being collapsed into a single "warning IL2104: Assembly 'X' produced trim warnings."

The issue is that we are using FileName, which cuts off the file extension of the item. But the items we are working with already cut off the `.dll` extension, so it this is cutting off important parts of the assembly name. The fix is to just use Identity, which is the whole item id.
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
)

When publishing for native AOT and a ProjectReference has trim/AOT warnings, all the warnings are being collapsed into a single "warning IL2104: Assembly 'X' produced trim warnings."

The issue is that we are using FileName, which cuts off the file extension of the item. But the items we are working with already cut off the `.dll` extension, so it this is cutting off important parts of the assembly name. The fix is to just use Identity, which is the whole item id.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants