Skip to content

Fix PublishAot single warning issue for ProjectReferences - #101799

Merged
MichalStrehovsky merged 1 commit into
dotnet:mainfrom
eerhardt:FixNativeAOTNoSingleWarn
May 2, 2024
Merged

MichalStrehovsky merged 1 commit into
dotnet:mainfrom
eerhardt:FixNativeAOTNoSingleWarn

Conversation

@eerhardt

@eerhardt eerhardt commented May 2, 2024

Copy link
Copy Markdown
Member

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.
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@agocke agocke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@MichalStrehovsky MichalStrehovsky left a comment

Copy link
Copy Markdown
Member

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