Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorEric St. John <ericstj@microsoft.com>2017-04-12 19:29:09 +0300
committerEric St. John <ericstj@microsoft.com>2017-04-12 23:43:37 +0300
commit8b017caf0ed3571a6999c95e88c0ad15fe2ade8b (patch)
tree563d5e077041f157f11433eecf81ebee6218d83d /pkg
parentcacde890df99eec6150e35b206eb3efb76b4826b (diff)
Set PackageConflictPreferredPackages, enable opt-out
This sets PackageConflictPreferredPackages to ensure these libraries will win over same-versioned libraries from other packages. I've also added a property, ImplicitlyExpandNETStandardFacades to support folks turning off the references if they wish, similar to ImplicitlyExpandDesignTimeFacades in Microsoft.NETFramework.CurrentVersion.targets.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj21
-rw-r--r--pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.props7
-rw-r--r--pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets6
3 files changed, 20 insertions, 14 deletions
diff --git a/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj b/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj
index fd34d09277..6776bd701f 100644
--- a/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj
+++ b/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj
@@ -19,9 +19,12 @@
</PropertyGroup>
<ItemGroup>
- <TargetsFile Include="targets\NETStandard.Library.NETFramework.targets">
+ <StampFile Include="targets\NETStandard.Library.NETFramework.props">
<TargetPath>build/$(TargetFramework)</TargetPath>
- </TargetsFile>
+ </StampFile>
+ <File Include="targets\NETStandard.Library.NETFramework.targets">
+ <TargetPath>build/$(TargetFramework)</TargetPath>
+ </File>
</ItemGroup>
<Import Project="$(SourceDir)\shims\netfxreference.props" />
@@ -55,20 +58,20 @@
<Target Name="StampPackageVersion" BeforeTargets="GetFiles" DependsOnTargets="CalculatePackageVersion">
<ItemGroup>
- <TargetsFile>
- <StampedFile>$(IntermediateOutputPath)%(TargetsFile.RelativeDir)%(TargetsFile.FileName)%(TargetsFile.Extension)</StampedFile>
- </TargetsFile>
+ <StampFile>
+ <StampedFile>$(IntermediateOutputPath)%(StampFile.RelativeDir)%(StampFile.FileName)%(StampFile.Extension)</StampedFile>
+ </StampFile>
</ItemGroup>
- <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(TargetsFile.StampedFile)'))" />
+ <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(StampFile.StampedFile)'))" />
<!-- Update targets templates -->
<WriteLinesToFile
- File="%(TargetsFile.StampedFile)"
- Lines="$([System.IO.File]::ReadAllText('%(TargetsFile.FullPath)').Replace('{PACKAGE_VERSION}', $(PackageVersion)))"
+ File="%(StampFile.StampedFile)"
+ Lines="$([System.IO.File]::ReadAllText('%(StampFile.FullPath)').Replace('{PACKAGE_VERSION}', $(PackageVersion)))"
Overwrite="true"/>
<ItemGroup>
- <File Include="@(TargetsFile->'%(StampedFile)')" />
+ <File Include="@(StampFile->'%(StampedFile)')" />
</ItemGroup>
</Target>
diff --git a/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.props b/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.props
new file mode 100644
index 0000000000..1019c11442
--- /dev/null
+++ b/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.props
@@ -0,0 +1,7 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <NETStandardLibraryNETFrameworkPackageVersion>{PACKAGE_VERSION}</NETStandardLibraryNETFrameworkPackageVersion>
+ <PackageConflictPreferredPackages>NETStandard.Library.NETFramework;$(PackageConflictPreferredPackages)</PackageConflictPreferredPackages>
+ <ImplicitlyExpandNETStandardFacades Condition="'$(ImplicitlyExpandNETStandardFacades)' == ''">true</ImplicitlyExpandNETStandardFacades>
+ </PropertyGroup>
+</Project>
diff --git a/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets b/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets
index 0dc72155fa..ee5b2c377e 100644
--- a/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets
+++ b/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets
@@ -1,9 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <NETStandardLibraryNETFrameworkPackageVersion>{PACKAGE_VERSION}</NETStandardLibraryNETFrameworkPackageVersion>
- </PropertyGroup>
-
- <ItemGroup>
+ <ItemGroup Condition="'$(ImplicitlyExpandNETStandardFacades)' == 'true'">
<Reference Include="$(MSBuildThisFileDirectory)\ref\*.dll">
<!-- Private = false to make these reference only -->
<Private>false</Private>