Skip to content

Commit

Permalink
Update compat pack to depend on WCF latest stable version and give ab…
Browse files Browse the repository at this point in the history
…ility to depend on external non-stable packages (dotnet/corefx#42464)

* Update compat pack to depend on WCF latest stable version and give hability to depend on external non-stable packages

* Fix two issues found when diffing nuspecs


Commit migrated from dotnet/corefx@b7e6f39
  • Loading branch information
safern authored Nov 9, 2019
1 parent 2c5a320 commit b0f55da
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 85 deletions.
5 changes: 2 additions & 3 deletions src/libraries/pkg/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<Target Name="ApplyBaselineToStaticDependencies"
BeforeTargets="AssignPkgProjPackageDependenciesTargetFramework"
Condition="'@(Dependency)' != ''">
<ApplyBaseLine OriginalDependencies="@(Dependency)"
Condition="'@(IndexedDependency)' != ''">
<ApplyBaseLine OriginalDependencies="@(IndexedDependency)"
BaseLinePackages="@(BaseLinePackage)"
PackageIndexes="@(PackageIndex)"
Apply="$(BaseLinePackageDependencies)">
Expand All @@ -23,7 +23,6 @@
</ApplyPreReleaseSuffix>

<ItemGroup>
<Dependency Remove="@(Dependency)" />
<Dependency Include="@(_SuffixedStaticDependencies)" />
</ItemGroup>
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<NonNetCoreAppPackage Include="Microsoft.Diagnostics.Tracing.EventSource.Redist" />
<NonNetCoreAppPackage Include="Microsoft.IO.Redist" />

<Dependency Include="@(PrereleaseLibraryPackage)"
<IndexedDependency Include="@(PrereleaseLibraryPackage)"
Exclude="@(NonNetCoreAppPackage)"
Condition="!$([System.String]::new('%(Identity)').Contains('Private')) and !$([System.String]::new('%(Identity)').EndsWith('Experimental')) and !$([System.String]::new('%(Identity)').StartsWith('runtime.'))" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
<ServiceModelVersion>4.6.0</ServiceModelVersion>
<ServiceModelVersion>4.7.0</ServiceModelVersion>
<!-- We don't need to harvest the stable packages to build this -->
<HarvestStablePackage>false</HarvestStablePackage>
</PropertyGroup>
Expand All @@ -13,9 +13,6 @@
<Version>$(PackageVersion)</Version>
</NS21PrereleaseLibraryPackage>
</ItemDefinitionGroup>
<ItemGroup>
<PackageIndex Include="$(MSBuildThisFileDirectory)externalIndex.json" />
</ItemGroup>
<ItemGroup>
<PrereleaseLibraryPackage Include="Microsoft.Win32.Registry" />
<PrereleaseLibraryPackage Include="Microsoft.Win32.Registry.AccessControl" />
Expand Down Expand Up @@ -54,54 +51,74 @@

<NS21PrereleaseLibraryPackage Include="System.ComponentModel.Composition.Registration" />
<NS21PrereleaseLibraryPackage Include="System.Reflection.Context" />
<!-- Service model packages -->
<LibraryPackage Include="System.ServiceModel.Primitives">
<Version>$(ServiceModelVersion)</Version>
</LibraryPackage>
<LibraryPackage Include="System.ServiceModel.Duplex">
<Version>$(ServiceModelVersion)</Version>
</LibraryPackage>
<LibraryPackage Include="System.ServiceModel.Http">
<Version>$(ServiceModelVersion)</Version>
</LibraryPackage>
<LibraryPackage Include="System.ServiceModel.NetTcp">
<Version>$(ServiceModelVersion)</Version>
</LibraryPackage>
<LibraryPackage Include="System.ServiceModel.Security">
<Version>$(ServiceModelVersion)</Version>
</LibraryPackage>

<!-- Packages we don't build in master anymore -->
<LibraryPackage Include="System.IO.Pipes.AccessControl">
<Version>4.5.1</Version>
</LibraryPackage>
<LibraryPackage Include="System.Data.DataSetExtensions">
<Version>4.5.0</Version>
</LibraryPackage>

<!-- Service model packages -->
<ExternalLibraryPackage Include="System.ServiceModel.Primitives">
<Version>$(ServiceModelVersion)</Version>
</ExternalLibraryPackage>
<ExternalLibraryPackage Include="System.ServiceModel.Duplex">
<Version>$(ServiceModelVersion)</Version>
</ExternalLibraryPackage>
<ExternalLibraryPackage Include="System.ServiceModel.Http">
<Version>$(ServiceModelVersion)</Version>
</ExternalLibraryPackage>
<ExternalLibraryPackage Include="System.ServiceModel.NetTcp">
<Version>$(ServiceModelVersion)</Version>
</ExternalLibraryPackage>
<ExternalLibraryPackage Include="System.ServiceModel.Security">
<Version>$(ServiceModelVersion)</Version>
</ExternalLibraryPackage>
</ItemGroup>
<ItemGroup>
<!-- The shims included in the shims package are only needed for netcoreapp2.0 since in newer frameworks they are included inbox.
In order to condition the shims package to an specific framework other dependencies need to specify their target framework. So
we need to include the dependencies with the supported frameworks and then we include the compatibility shims package only for 2.0 -->
<Dependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage)">
<IndexedDependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage)">
<TargetFramework>netcoreapp2.0</TargetFramework>
</IndexedDependency>
<IndexedDependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage)">
<TargetFramework>netcoreapp2.1</TargetFramework>
</IndexedDependency>
<IndexedDependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage);@(NS21PrereleaseLibraryPackage)">
<TargetFramework>netcoreapp3.0</TargetFramework>
</IndexedDependency>
<IndexedDependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage)">
<TargetFramework>netstandard2.0</TargetFramework>
</IndexedDependency>
<IndexedDependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage);@(NS21PrereleaseLibraryPackage)">
<TargetFramework>netstandard2.1</TargetFramework>
</IndexedDependency>
<!-- Include dependency to shims package -->
<IndexedDependency Include="Microsoft.Windows.Compatibility.Shims">
<Version>2.0.1</Version>
<TargetFramework>netcoreapp2.0</TargetFramework>
</IndexedDependency>
</ItemGroup>

<ItemGroup>
<Dependency Include="@(ExternalLibraryPackage)">
<TargetFramework>netcoreapp2.0</TargetFramework>
</Dependency>
<Dependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage)">
<Dependency Include="@(ExternalLibraryPackage)">
<TargetFramework>netcoreapp2.1</TargetFramework>
</Dependency>
<Dependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage);@(NS21PrereleaseLibraryPackage)">
<Dependency Include="@(ExternalLibraryPackage)">
<TargetFramework>netcoreapp3.0</TargetFramework>
</Dependency>
<Dependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage)">
<Dependency Include="@(ExternalLibraryPackage)">
<TargetFramework>netstandard2.0</TargetFramework>
</Dependency>
<Dependency Include="@(LibraryPackage);@(PrereleaseLibraryPackage);@(NS21PrereleaseLibraryPackage)">
<Dependency Include="@(ExternalLibraryPackage)">
<TargetFramework>netstandard2.1</TargetFramework>
</Dependency>
<!-- Include dependency to shims package -->
<Dependency Include="Microsoft.Windows.Compatibility.Shims">
<Version>2.0.1</Version>
<TargetFramework>netcoreapp2.0</TargetFramework>
</Dependency>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>

This file was deleted.

2 changes: 1 addition & 1 deletion src/libraries/pkg/frameworkPackage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<TargetRuntime>%(Identity)</TargetRuntime>
<Version>$(PackageVersion)</Version>
</_buildRIDWithMetadata>
<Dependency Include="@(_buildRIDWithMetadata->'runtime.%(Identity).$(Id)')" />
<IndexedDependency Include="@(_buildRIDWithMetadata->'runtime.%(Identity).$(Id)')" />
</ItemGroup>

<!-- Bring in lib content from binplaced lib props -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<_buildRIDWithMetadata Include="@(BuildRID)">
<Version>$(PackageVersion)</Version>
</_buildRIDWithMetadata>
<Dependency Include="@(_buildRIDWithMetadata->'runtime.%(Identity).$(Id)')" />
<IndexedDependency Include="@(_buildRIDWithMetadata->'runtime.%(Identity).$(Id)')" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>

0 comments on commit b0f55da

Please sign in to comment.