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

Add OutputRID to RID graph during source build #50157

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
<add key="ericstj-staging" value="https://www.myget.org/F/ericstj-staging/api/v3/index.json" />
<!-- Used for the Rich Navigation indexing task -->
<add key="richnav" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
</packageSources>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21167.3</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21167.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-ericstj-032321.5</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21167.3</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21167.3</MicrosoftDotNetVersionToolsTasksVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@
<!-- We don't need to harvest the stable packages to build this -->
<HarvestStablePackage>false</HarvestStablePackage>
<PackageDescription>Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NETCore packages.</PackageDescription>
<InferRuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(InferRuntimeIdentifiers);$(OutputRID)</InferRuntimeIdentifiers>
Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like we have both PackageRID and OutputRID since the runtime consolidation. I'm not sure why we have two: they both seem to try to be accomplishing the same thing. I use OutputRID here since that's what installer appears to use.

Copy link
Member

Choose a reason for hiding this comment

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

I believe @jkoritzinsky is who has more context about OutputRID vs PackageRID but it seems like installer uses PackageRID to restore tooling and stuff and OutputRID is the rid to produce the package for.

Copy link
Member Author

Choose a reason for hiding this comment

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

installer uses PackageRID to restore tooling and stuff

I don't think its tooling. I think installer uses this to for selecting packages from CoreCLR / Libraries (was more relevant when those were separate repos). I'm 90% sure that its wrong to have two different properties here.

Copy link
Member

Choose a reason for hiding this comment

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

Yep something like that was I couldn't remember exactly. I think we should just use PackageRID and remove OutputRID

</PropertyGroup>
<ItemGroup>
<File Include="runtime.json" />
<File Condition="'$(InferRuntimeIdentifiers)' == ''" Include="runtime.json" />
<File Condition="'$(InferRuntimeIdentifiers)' != ''" Include="$(IntermediateOutputPath)runtime.json" />
<!-- make this package installable and noop in a packages.config-based project -->
<File Include="$(PlaceHolderFile)">
<TargetPath>lib/netstandard1.0</TargetPath>
</File>
</ItemGroup>
</ItemGroup>

<Target Name="GenerateRuntimeJsonWithInferredRids" Condition="'$(InferRuntimeIdentifiers)' != ''" BeforeTargets="CreatePackage">
<MakeDir Directories="$(IntermediateOutputPath)" />
<GenerateRuntimeGraph RuntimeGroups="@(RuntimeGroupWithQualifiers)"
InferRuntimeIdentifiers="$(InferRuntimeIdentifiers)"
RuntimeJson="$(IntermediateOutputPath)runtime.json"
UpdateRuntimeFiles="True" />
</Target>

<Import Project="runtimeGroups.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>