Skip to content
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,43 @@
<PackageReadmeFilePath>$(MSBuildThisFileDirectory)../src/PACKAGE.md</PackageReadmeFilePath>
</PropertyGroup>

<ItemGroup>
<PackageSupportedRID Include="android-arm" />
<PackageSupportedRID Include="android-arm64" />
<PackageSupportedRID Include="android-x64" />
<PackageSupportedRID Include="android-x86" />
<PackageSupportedRID Include="linux-arm" />
<PackageSupportedRID Include="linux-arm64" />
<PackageSupportedRID Include="linux-bionic-arm64" />
<PackageSupportedRID Include="linux-bionic-x64" />
<PackageSupportedRID Include="linux-musl-arm" />
<PackageSupportedRID Include="linux-musl-arm64" />
<PackageSupportedRID Include="linux-musl-x64" />
<PackageSupportedRID Include="linux-x64" />
<PackageSupportedRID Include="maccatalyst-arm64" />
<PackageSupportedRID Include="maccatalyst-x64" />
<PackageSupportedRID Include="osx-arm64" />
<PackageSupportedRID Include="osx-x64" />
Copy link
Member

Choose a reason for hiding this comment

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

I would like @ericstj to comment on this PR (as I'm currently out). IMO it would be better to not rely on a static list here as that requires more things to touch when adding a new runtime RID package.

From a given RID it should be possible to get the parent RIDs either via an SDK task or via a custom msbuild task.

Copy link
Member Author

Choose a reason for hiding this comment

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

We'd need the other way round, going from parent RID to child RIDs since we need to include those in the parent-RID-package. I'm not sure that will be easier. I can try basing it off of the runtime.<RID>.runtime.native.System.IO.Ports.proj files though.

Copy link
Member Author

Choose a reason for hiding this comment

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

pushed an update


<!-- We need to add a placeholder file for all RIDs except the one that is actually included in the RID-specific package.
This prevents an issue where during publish the SDK would select e.g. both linux-x64 and linux-musl-x64 assets because of the fallback path in the RID graph. -->
<PackagePlaceholderRID Include="@(PackageSupportedRID)" Exclude="$(OutputRID)" />
</ItemGroup>

<ItemGroup>
<None Include="$(NativeBinDir)$(LibPrefix)System.IO.Ports.Native$(LibSuffix)"
PackagePath="runtimes/$(OutputRID)/native"
Pack="true" />
<None Include="$(PlaceholderFile)"
PackagePath="@(PackagePlaceholderRID->'runtimes/%(Identity)/native')"
Pack="true" />
</ItemGroup>

<Target Name="ValidatePackageSupportedRID" BeforeTargets="Build">
<Error Text="$(OutputRID) is missing from PackageSupportedRID."
Condition="!@(PackageSupportedRID->AnyHaveMetadataValue('Identity', '$(OutputRID)'))" />
</Target>

<Target Name="AddRuntimeSpecificNativeSymbolToPackage">
<ItemGroup>
<TfmSpecificDebugSymbolsFile Include="$(NativeBinDir)$(LibPrefix)System.IO.Ports.Native$(LibSuffix)$(SymbolsSuffix)"
Expand Down