Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Add x-plat nuget packages for runtime and hosts
Browse files Browse the repository at this point in the history
This adds x-plat implementation packages for runtime and hosts.
Implementation packages have naming convention of
runtime.(<rid>.)(<target>.)<packageId. They are refernced by
a primary package via runtime.json constrained by the
appropriate runtime identifier for their platform.

I've ported the existing runtime and host packages to use this
convention and ported existing packages that already had runtime
specific implementation (System.IO.Compression and
System.Data.SqlClient). For System.IO.Compression I have also
added the unix runtime library.

For x-plat runtime I needed to produce some packages that are only
amd64. We didn't have support for this, in the past we just special
cased the package IDs. Rather than continuing to special case
I added support for a project to define which architectures it should
build for. Projects can control their architecture by specifying the
PackagePlatforms property as a semi-colon delimited list.
If this is not done then the package will build if the target runtime
contains the current architecture or if we're building for x86.
I have removed the special cases after implementing this fix.

In implementing this I uncovered a constraint in how nuget handles
runtime.json. It will only import runtime dependencies once.
It does a pass of the compile graph and imports any runtime specific
dependencies and their direct closure for the active target framework.
If any of the newly imported runtime specific packages have a runtime.json
it is ignored. I've added validation to catch this case if we do it and
added a feature to make it easier to define runtime dependencies
that are associated with some package other than project in which
they are contained: PackageAlias and TargetPackageAlias.

[tfs-changeset: 1519157]
  • Loading branch information
ericstj committed Aug 26, 2015
1 parent 6cffbc2 commit 929c0ee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/System.IO.Compression/src/System.IO.Compression.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
<ProjectGuid>{5471BFE8-8071-466F-838E-5ADAA779E742}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UseECMAKey Condition="'$(UseECMAKey)'==''">true</UseECMAKey>
<PackageTargetFramework>dotnet</PackageTargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetsWindows)' == 'true' ">
<PackageTargetRuntime>win7</PackageTargetRuntime>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetsUnix)' == 'true' ">
<PackageTargetRuntime>Unix</PackageTargetRuntime>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Linux_Debug|AnyCPU'" />
Expand Down

0 comments on commit 929c0ee

Please sign in to comment.