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

Projects using PackAsToolShimRuntimeIdentifiers are missing assets in VMR #4944

Open
wtgodbe opened this issue Mar 12, 2025 · 5 comments
Open
Assignees

Comments

@wtgodbe
Copy link
Member

wtgodbe commented Mar 12, 2025

Projects that list multiple rids in PackAsToolShimRuntimeIdentifiers are broken in the VMR - we have to list only 1 RID for those (the current one) in the VMR, which means they're not packing the full set of assets they should be. e.g. https://github.com/dotnet/aspnetcore/blob/e6d943297f981ae68003b215f0cee66891cdf8ae/src/Tools/Directory.Build.targets#L5-L6 and https://github.com/dotnet/sdk/blob/9c64e2f36f03e62ca82659c0e08e0b46514df2d4/src/BuiltInTools/dotnet-format/dotnet-format.csproj#L26-L27. We need to figure out a way to build these in the VMR & pack the full set of RID-specific shims in 1 package

CC @dsplaisted do you know how this functionality is supposed to work?

@dsplaisted
Copy link
Member

do you know how this functionality is supposed to work?

We package the shims / hosts with our tools because they need to be signed. And we want the tools to be runnable from multiple architectures (or from WOW64 I assume), so we need the shims for multiple RIDs.

Is that what you were asking about?

My understanding is that the VMR builds everything for a single architecture and so creating packages that include assets from multiple architectures is difficult. So I can see how this would be problematic but don't know how the VMR build handles situations like this.

@mmitche
Copy link
Member

mmitche commented Mar 14, 2025

The VMR has a second pass where it can take input from multiple verticals of the first pass and combine them together.

@ViktorHofer
Copy link
Member

ViktorHofer commented Mar 17, 2025

I just searched through dotnet/dotnet. We only have 14 tools PackAsTool packages that set PackAsToolShimRuntimeIdentifiers: https://github.com/search?q=repo%3Adotnet%2Fdotnet%20PackAsToolShimRuntimeIdentifiers&type=code

dotnet/diagnostics: 8
dotnet/runtime: 1
dotnet/command-line-api: 1
dotnet/efcore: 1
dotnet/sourcelink 1
dotnet/aspnetcore: 1
dotnet/sdk: 1

Only the repos that use the live runtime shared framework (not just nuget packages) need infra support here. We should update those repos and condition their use of live runtime shared framework artifacts on whether the project sets PackAsToolShimRuntimeIdentifiers.

Here's an example of wpf's usage of the live runtime shared framework: https://github.com/dotnet/wpf/blob/d3589ca1397f4bf697d990fc40ea54700df1159c/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets#L30-L42

@ViktorHofer
Copy link
Member

ViktorHofer commented Mar 17, 2025

I think this means only winforms, wpf, aspnetcore and (apparently) sdk are impacted. The infra that consumes the live shared framework (see the example link above) needs to be conditioned to not use live when the project sets PackAsToolShimRuntimeIdentifiers.

And these two conditions need to get updated:

@mmitche
Copy link
Member

mmitche commented Mar 18, 2025

@NikolaMilosavljevic can you take a look at this one?

@mmitche mmitche moved this from Ready to Done in .NET Unified Build Mar 19, 2025
@mmitche mmitche closed this as completed by moving to Done in .NET Unified Build Mar 19, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in .NET Unified Build Mar 19, 2025
@mmitche mmitche moved this from Done to In Progress in .NET Unified Build Mar 19, 2025
@mmitche mmitche moved this from Done to In Progress in .NET Unified Build Mar 19, 2025
@mmitche mmitche reopened this Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

6 participants