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 02:45:09 +0300
committerEric St. John <ericstj@microsoft.com>2017-04-12 23:42:52 +0300
commit796a4b6af55c9ff548e172a943b9af737706fe2b (patch)
tree428c1990e3e871306256003d6a97b41206659a22 /pkg
parent5635b57b487454f47fccae8aad3a53640d47b0c3 (diff)
Add NETStandard.Library.NETFramework package
This package is a support package for NETStandard2.0 on .NET 4.6.1.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/NETStandard.Library.NETFramework/Configurations.props8
-rw-r--r--pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.builds11
-rw-r--r--pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj88
-rw-r--r--pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets23
-rw-r--r--pkg/descriptions.json10
-rw-r--r--pkg/frameworkPackage.targets10
6 files changed, 138 insertions, 12 deletions
diff --git a/pkg/NETStandard.Library.NETFramework/Configurations.props b/pkg/NETStandard.Library.NETFramework/Configurations.props
new file mode 100644
index 0000000000..064de9fd71
--- /dev/null
+++ b/pkg/NETStandard.Library.NETFramework/Configurations.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <BuildConfigurations>
+ netfx;
+ </BuildConfigurations>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.builds b/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.builds
new file mode 100644
index 0000000000..65816c1d8b
--- /dev/null
+++ b/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.builds
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <ItemGroup>
+ <Project Include="$(MSBuildProjectName).pkgproj" />
+ </ItemGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
+
+</Project> \ No newline at end of file
diff --git a/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj b/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj
new file mode 100644
index 0000000000..fd34d09277
--- /dev/null
+++ b/pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" InitialTargets="FillInPackageContent" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <PropertyGroup>
+ <PackageVersion>2.0.0</PackageVersion>
+ <TargetFrameworkName>net</TargetFrameworkName>
+ <TargetFrameworkVersion>461</TargetFrameworkVersion>
+ <TargetFramework>$(TargetFrameworkName)$(TargetFrameworkVersion)</TargetFramework>
+
+ <RefBinDir>$(NetFxPackageRefPath)</RefBinDir>
+ <LibBinDir>$(NetFxPackageRuntimePath)</LibBinDir>
+
+ <IsFrameworkPackage>true</IsFrameworkPackage>
+ <IncludeLibFiles>true</IncludeLibFiles>
+
+ <RefFileTargetPath>build/$(TargetFramework)/ref</RefFileTargetPath>
+ <LibFileTargetPath>build/$(TargetFramework)/lib</LibFileTargetPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <TargetsFile Include="targets\NETStandard.Library.NETFramework.targets">
+ <TargetPath>build/$(TargetFramework)</TargetPath>
+ </TargetsFile>
+ </ItemGroup>
+
+ <Import Project="$(SourceDir)\shims\netfxreference.props" />
+
+ <!-- runs as initial target -->
+ <Target Name="FillInPackageContent">
+ <ItemGroup>
+ <_refFileNames Include="@(RefFile->'%(FileName)')" Condition="'%(Extension)' == '.dll'" />
+ <_libFileNames Include="@(LibFile->'%(FileName)')" Condition="'%(Extension)' == '.dll'" />
+
+ <!-- remove any targeting pack assemblies that we build ourselves -->
+ <_netFxReference Include="@(NetFxReference)" Exclude="@(_refFileNames);@(_libFileNames)" />
+
+ <!-- ignore any assemblies we expect to come from the targeting pack -->
+ <IgnoredReference Include="@(_netFxReference)" />
+ <SuppressNETStandardMissingFile Include="@(_netFxReference)" />
+
+ <!-- don't include shims for anything from the targeting pack or built explicitly -->
+ <_excludeShimsRef Include="@(_netFxReference);@(_refFileNames)"/>
+ <_excludeShimsLib Include="@(_netFxReference);@(_libFileNames)"/>
+
+ <!-- fill in with netstandard.dll-based shims -->
+ <File Include="$(NETStandardPackageRefPath)\*.dll" Exclude="@(_excludeShimsRef->'$(NETStandardPackageRefPath)\%(Identity).dll')">
+ <TargetPath>$(RefFileTargetPath)</TargetPath>
+ </File>
+ <File Include="$(NETStandardPackageRefPath)\*.dll" Exclude="@(_excludeShimsLib->'$(NETStandardPackageRefPath)\%(Identity).dll')">
+ <TargetPath>$(LibFileTargetPath)</TargetPath>
+ </File>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="StampPackageVersion" BeforeTargets="GetFiles" DependsOnTargets="CalculatePackageVersion">
+ <ItemGroup>
+ <TargetsFile>
+ <StampedFile>$(IntermediateOutputPath)%(TargetsFile.RelativeDir)%(TargetsFile.FileName)%(TargetsFile.Extension)</StampedFile>
+ </TargetsFile>
+ </ItemGroup>
+
+ <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(TargetsFile.StampedFile)'))" />
+ <!-- Update targets templates -->
+ <WriteLinesToFile
+ File="%(TargetsFile.StampedFile)"
+ Lines="$([System.IO.File]::ReadAllText('%(TargetsFile.FullPath)').Replace('{PACKAGE_VERSION}', $(PackageVersion)))"
+ Overwrite="true"/>
+
+ <ItemGroup>
+ <File Include="@(TargetsFile->'%(StampedFile)')" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="AddNETStandardLibraryReference" AfterTargets="ApplyBaselineToStaticDependencies">
+ <ItemGroup>
+ <!-- ApplyBaseline doesn't handle NuGet versions, so workaround that by
+ adding after we've baselined.
+ https://github.com/dotnet/buildtools/issues/1432 -->
+ <Dependency Include="$(NETStandardPackageId)">
+ <Version>$(NETStandardPackageVersion)</Version>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </Dependency>
+ </ItemGroup>
+ </Target>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
diff --git a/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets b/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets
new file mode 100644
index 0000000000..0dc72155fa
--- /dev/null
+++ b/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets
@@ -0,0 +1,23 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <NETStandardLibraryNETFrameworkPackageVersion>{PACKAGE_VERSION}</NETStandardLibraryNETFrameworkPackageVersion>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Reference Include="$(MSBuildThisFileDirectory)\ref\*.dll">
+ <!-- Private = false to make these reference only -->
+ <Private>false</Private>
+ <NuGetPackageId>NETStandard.Library.NETFramework</NuGetPackageId>
+ <NuGetPackageVersion>$(NETStandardLibraryNETFrameworkPackageVersion)</NuGetPackageVersion>
+ <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference>
+ <NuGetSourceType>Package</NuGetSourceType>
+ </Reference>
+ <ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\lib\*.dll">
+ <Private>false</Private>
+ <NuGetPackageId>NETStandard.Library.NETFramework</NuGetPackageId>
+ <NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
+ <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference>
+ <NuGetSourceType>Package</NuGetSourceType>
+ </ReferenceCopyLocalPaths>
+ </ItemGroup>
+</Project>
diff --git a/pkg/descriptions.json b/pkg/descriptions.json
index 35d0e3c7cf..421744fca9 100644
--- a/pkg/descriptions.json
+++ b/pkg/descriptions.json
@@ -149,14 +149,8 @@
"CommonTypes": []
},
{
- "Name": "NETStandard.Library",
- "Description": "A set of standard .NET APIs that are prescribed to be used and supported together. This includes all of the APIs in the NETStandard.Platform package plus additional libraries that are core to .NET but built on top of NETStandard.Platform.",
- "CommonTypes": [
- ]
- },
- {
- "Name": "NETStandard.Platform",
- "Description": "A set of low level APIs that all .NET platforms must support.",
+ "Name": "NETStandard.Library.NETFramework",
+ "Description": "Adds NETStandard2.0 support to .NET Framework.",
"CommonTypes": [
]
},
diff --git a/pkg/frameworkPackage.targets b/pkg/frameworkPackage.targets
index de54df7275..a7a6f09d58 100644
--- a/pkg/frameworkPackage.targets
+++ b/pkg/frameworkPackage.targets
@@ -10,6 +10,7 @@
<SkipValidatePackage>true</SkipValidatePackage>
<NETStandardVersion Condition="'$(NETStandardVersion)' == ''">2.0</NETStandardVersion>
+ <NETStandardPackageRefPath Condition="'$(NETStandardPackageRefPath)' == ''">$(PackagesDir)$(NETStandardPackageId.ToLower())\$(NETStandardPackageVersion)\build\netstandard$(NETStandardVersion)\ref</NETStandardPackageRefPath>
<IncludeReferenceFiles Condition="'$(IncludeReferenceFiles)' == '' AND '$(PackageTargetRuntime)' == ''">true</IncludeReferenceFiles>
<IncludeLibFiles Condition="'$(IncludeLibFiles)' == '' AND '$(PackageTargetRuntime)' != ''">true</IncludeLibFiles>
@@ -40,6 +41,7 @@
<Dependency Include="Microsoft.NETCore.Platforms">
<Version>$(PlatformPackageVersion)</Version>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
</Dependency>
</ItemGroup>
@@ -67,14 +69,14 @@
<Target Name="_getFinalFilesExisting">
<ItemGroup>
- <_refFileExisting Include="@(File)" Condition="Exists('%(FullPath)') AND $([System.String]::new('%(File.TargetPath)').StartsWith('ref'))" />
+ <_refFileExisting Include="@(File)" Condition="Exists('%(FullPath)') AND ($([System.String]::new('%(File.TargetPath)').StartsWith('ref')) OR '%(File.TargetPath)' == '$(RefFileTargetPath)')" />
<_refFileNames Include="@(_refFileExisting -> '%(FileName)')">
<Original>%(_refFileExisting.Identity)</Original>
</_refFileNames>
<_refFileNamesFiltered Include="@(_refFileNames)" Exclude="@(ExcludeFromClosure)" />
<_refFilesFiltered Include="@(_refFileNamesFiltered->'%(Original)')" />
- <_runtimeFileExisting Include="@(File)" Condition="Exists('%(FullPath)') AND ($([System.String]::new('%(File.TargetPath)').StartsWith('lib')) OR $([System.String]::new('%(File.TargetPath)').StartsWith('runtimes')))" />
+ <_runtimeFileExisting Include="@(File)" Condition="Exists('%(FullPath)') AND ($([System.String]::new('%(File.TargetPath)').StartsWith('lib')) OR $([System.String]::new('%(File.TargetPath)').StartsWith('runtimes')) OR '%(File.TargetPath)' == '$(LibFileTargetPath)')" />
<_runtimeFileNames Include="@(_runtimeFileExisting -> '%(FileName)')">
<Original>%(_runtimeFileExisting.Identity)</Original>
</_runtimeFileNames>
@@ -101,9 +103,9 @@
<Target Name="VerifyNETStandard" DependsOnTargets="_getFinalFilesExisting" AfterTargets="Build">
<ItemGroup>
- <_NETStandardFile Include="$(PackagesDir)$(NETStandardPackageId.ToLower())\$(NETStandardPackageVersion)\build\netstandard$(NETStandardVersion)\ref\*.dll" />
+ <_NETStandardFile Include="$(NETStandardPackageRefPath)\*.dll" />
<!-- force a missing file there are no files found in the package -->
- <_NETStandardFile Include="$(PackagesDir)$(NETStandardPackageId.ToLower())\$(NETStandardPackageVersion)\build\netstandard$(NETStandardVersion)\ref\MISSING_NETSTANDARD_PACKAGE" Condition="'@(_NETStandardFile)' == ''" />
+ <_NETStandardFile Include="$(NETStandardPackageRefPath)\MISSING_NETSTANDARD_PACKAGE" Condition="'@(_NETStandardFile)' == ''" />
<_NETStandardRefMissingFile Include="@(_NETStandardFile->'%(FileName)')" Exclude="@(_refFileNames)" />
<_NETStandardRefMissingFileError Include="@(_NETStandardRefMissingFile)" Exclude="@(SuppressNETStandardMissingFile)" />