Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<PackageVersion>$(PlatformPackageVersion)</PackageVersion>
<PackageVersion>2.1.0</PackageVersion>
<SkipValidatePackage>true</SkipValidatePackage>
<!-- We don't need to harvest the stable packages to build this -->
<HarvestStablePackage>false</HarvestStablePackage>
@@ -17,5 +17,7 @@
</File>
</ItemGroup>
<Import Project="runtimeGroups.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -86,6 +86,49 @@ If you're prototyping on a platform that is compatible with an existing platform
`Microsoft.NETCore.Platforms` attempts to define all RIDs that packages may need, and as such will define RIDs for platforms that we don't actually cross compile for. This is to support higher-level packages, 3rd party packages, that may need to cross-compile for that RID.
### Adding a new OS
Add a new `RuntimeGroup` item in `runtimeGroups.props`.
For example:
```xml
<RuntimeGroup Include="myLinuxDistro">
<Parent>linux</Parent>
<Architectures>x86;x64;arm</Architectures>
<Versions>42.0;43.0</Versions>
</RuntimeGroup>
```
This will create a new RID for `myLinuxDistro` where `myLinuxDistro` should be the string used for the `ID=` value in the `/etc/os-release` file.
Whenever modifying the `runtimeGroups.props` you should rebuild the project with `/p:UpdateRuntimeFiles=true` so that your changes will be regenerated in the checked-in `runtime.json`.
RuntimeGroup items have the following format:
- `Identity`: the base string for the RID, without version architecture, or qualifiers.
- `Parent`: the base string for the parent of this RID. This RID will be imported by the baseRID, architecture-specific, and qualifier-specific RIDs (with the latter two appending appropriate architecture and qualifiers).
- `Versions`: A list of strings delimited by semi-colons that represent the versions for this RID.
- `TreatVersionsAsCompatible`: Default is true. When true, version-specific RIDs will import the previous version-specific RID in the Versions list, with the first version importing the version-less RID. When false all version-specific RIDs will import the version-less RID (bypassing previous version-specific RIDs)
- `OmitVersionDelimiter`: Default is false. When true no characters will separate the base RID and version (EG: win7). When false a '.' will separate the base RID and version (EG: osx.10.12).
- `ApplyVersionsToParent`: Default is false. When true, version-specific RIDs will import version-specific Parent RIDs similar to is done for architecture and qualifier (see Parent above).
- `Architectures`: A list of strings delimited by semi-colons that represent the architectures for this RID.
- `AdditionalQualifiers`: A list of strings delimited by semi-colons that represent the additional qualifiers for this RID. Additional qualifers do not stack, each only applies to the qualifier-less RIDs (so as not to cause combinatorial exponential growth of RIDs).
### Adding a new version to an existing OS
Find the existing `RuntimeGroup` in `runtimeGroups.props` and add the version to the list of `Versions`, separated by a semi-colon.
If the version you are adding needs to be treated as not-compatible with previous versions and the `RuntimeGroup` has not set `TreatVersionsAsCompatible`=`false` then you may create a new `RuntimeGroup` to represent the new compatibility band.
### Checking your work
After making a change to `runtimeGroups.props` you can examine the resulting changes in `runtime.json` and `runtime.compatibility.json`.
`runtime.json` is the graph representation of the RIDs and is what ships in the package.
`runtime.compatibility.json` is a flattened version of the graph that shows the RID precedence for each RID in the graph.
### Version compatibility
Version compatibility is represented through imports. If a platform is considered compatible with another version of the same platform, or a specific version of another platform, then it can import that platform. This permits packages to reuse assets that were built for the imported platform on the compatible platform. Compatibility here is a bit nebulous because inevitably different platforms will have observable differences that can cause compatibility problems. For the purposes of RIDs we'll try to represent compatibility as versions of a platform that are explicitly advertised as being compatible with a previous version and/or another platform and don't have any known broad breaking changes. It is usually better to opt to treat platforms as compatible since that enables the scenario of building an asset for a particular version and using that in future versions, otherwise you force people to cross-compile for all future versions the moment they target a specific version.
## Appendix : details of RID graph generation
### Naming convention
We use the following convention in all newly-defined RIDs. Some RIDs (win7-x64, win8-x64) predate this convention and don't follow it, but all new RIDs should follow it.
`[os name].[version]-[architecture]-[additional qualifiers]`, for example `osx.10.10-x64` or `ubuntu.14.04-x64`
@@ -96,9 +139,6 @@ We use the following convention in all newly-defined RIDs. Some RIDs (win7-x64,
For all of these we strive to make them something that can be uniquely discoverable at runtime, so that a RID may be computed from an executing application. As such these properties should be derivable from `/etc/os-release` or similar platform APIs / data.
### Binary compatibility
Binary compatibility is represented through imports. If a platform is considered binary compatible with another version of the same platform, or a specific version of another platform, then it can import that platform. This permits packages to reuse assets that were built for the imported platform on the compatible platform. Binary compatibility here is a bit nebulous because inevietably different platforms will have observable differences that can cause compatibility problems. For the purposes of RIDs we'll try to represent compatibility as versions of a platform that are explicitly advertised as being compatible with a previous version and/or another platform and don't have any known broad breaking changes.
### Import convention
Imports should be used when the added RID is considered compatible with an existing RID.
@@ -107,4 +147,9 @@ Imports should be used when the added RID is considered compatible with an exist
3. Architecture-less RIDs that are compatible with a previous version RID for the same OS should then import the previous version, architecture neutral RID. EG: `osx.10.11` should import `osx.10.10`. If there is no earlier compatible/supported version, then a versionless RID should be imported. EG: `osx.10.10` should import `osx`.
4. Version-less RIDs should import an OS category. EG: `osx-x64` should import `unix-x64`, `osx` should import `unix`.
### Advanced RuntimeGroup metadata
The following options can be used under special circumstances but break the normal precedence rules we try to establish by generating the RID graph from common logic. These options make it possible to create a RID fallback chain that doesn't match the rest of the RIDs and therefore is hard for developers/package authors to reason about. Only use these options for cases where you know what you are doing and have carefully reviewed the resulting RID fallbacks using the CompatibliltyMap.
- `OmitRIDs`: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should be omitted from the RuntimeGraph. These RIDs will not be referenced nor defined.
- `OmitRIDDefinitions`: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should be omitted from the RuntimeGraph. These RIDs will not be defined by this RuntimeGroup, but will be referenced: useful in case some other RuntimeGroup (or runtime.json template) defines them.
- `OmitRIDReferences`: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should be omitted from the RuntimeGraph. These RIDs will be defined but not referenced by this RuntimeGroup.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<RuntimeGroup Include="unix">
<Parent>any</Parent>
<Architectures>x64;x86;arm;armel;arm64</Architectures>
</RuntimeGroup>
<RuntimeGroup Include="linux">
<Parent>unix</Parent>
<Architectures>x64;x86;arm;armel;arm64</Architectures>
</RuntimeGroup>
<RuntimeGroup Include="alpine">
<Parent>any</Parent>
<Architectures>x64</Architectures>
<Versions>3.6</Versions>
</RuntimeGroup>
<RuntimeGroup Include="android">
<Parent>any</Parent>
<Architectures>arm;arm64</Architectures>
<Versions>21</Versions>
</RuntimeGroup>
<RuntimeGroup Include="centos">
<Parent>rhel</Parent>
<Architectures>x64</Architectures>
<Versions>7</Versions>
<ApplyVersionsToParent>true</ApplyVersionsToParent>
</RuntimeGroup>
<RuntimeGroup Include="debian">
<Parent>linux</Parent>
<Architectures>x64;x86;arm;armel;arm64</Architectures>
<Versions>8</Versions>
</RuntimeGroup>
<RuntimeGroup Include="fedora">
<Parent>linux</Parent>
<Architectures>x64</Architectures>
<Versions>23;24;25;26</Versions>
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
</RuntimeGroup>
<RuntimeGroup Include="gentoo">
<Parent>linux</Parent>
<Architectures>x64</Architectures>
</RuntimeGroup>
<RuntimeGroup Include="linuxmint.17">
<Parent>ubuntu.14.04</Parent>
<Architectures>x64</Architectures>
<Versions>1;2;3</Versions>
</RuntimeGroup>
<RuntimeGroup Include="linuxmint.18">
<Parent>ubuntu.16.04</Parent>
<Architectures>x64</Architectures>
<Versions>1</Versions>
</RuntimeGroup>
<RuntimeGroup Include="ol">
<Parent>rhel</Parent>
<Architectures>x64</Architectures>
<Versions>7;7.0;7.1;7.2</Versions>
<ApplyVersionsToParent>true</ApplyVersionsToParent>
</RuntimeGroup>
<!-- all opensuse releases are independent -->
<RuntimeGroup Include="opensuse">
<Parent>linux</Parent>
<Architectures>x64</Architectures>
<Versions>13.2;42.1</Versions>
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
</RuntimeGroup>
<RuntimeGroup Include="osx">
<Parent>unix</Parent>
<Architectures>x64</Architectures>
<Versions>10.10;10.11;10.12</Versions>
</RuntimeGroup>
<!-- rhel 6 is independent -->
<RuntimeGroup Include="rhel">
<Parent>linux</Parent>
<Architectures>x64</Architectures>
<Versions>6</Versions>
</RuntimeGroup>
<RuntimeGroup Include="rhel">
<Parent>linux</Parent>
<Architectures>x64</Architectures>
<Versions>7;7.0;7.1;7.2;7.3;7.4</Versions>
</RuntimeGroup>
<RuntimeGroup Include="tizen">
<Parent>linux</Parent>
<Architectures>armel</Architectures>
<Versions>4.0.0</Versions>
</RuntimeGroup>
<!-- ubuntu releases are compatible on major versions-->
<RuntimeGroup Include="ubuntu">
<Parent>debian</Parent>
<Architectures>x64;x86;arm</Architectures>
<Versions>14.04;14.10;15.04;15.10</Versions>
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
</RuntimeGroup>
<RuntimeGroup Include="ubuntu">
<Parent>debian</Parent>
<Architectures>x64;x86;arm;arm64</Architectures>
<Versions>16.04;16.10</Versions>
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
</RuntimeGroup>
<RuntimeGroup Include="win">
<Parent>any</Parent>
<OmitVersionDelimiter>true</OmitVersionDelimiter>
<AdditionalQualifiers>aot</AdditionalQualifiers>
<Architectures>x64;x86;arm;arm64</Architectures>
<Versions>7;8;81;10</Versions>
</RuntimeGroup>
<!-- add corert to all RIDs -->
<RuntimeGroupWithQualifiers Include="@(RuntimeGroup)">
<AdditionalQualifiers>%(AdditionalQualifiers);corert</AdditionalQualifiers>
</RuntimeGroupWithQualifiers>
<!-- root RIDs -->
<RuntimeGroupWithQualifiers Include="base" />
<RuntimeGroupWithQualifiers Include="any">
<Parent>base</Parent>
</RuntimeGroupWithQualifiers>
<!-- qualifier RIDs -->
<RuntimeGroupWithQualifiers Include="aot">
<Parent>any</Parent>
</RuntimeGroupWithQualifiers>
<RuntimeGroupWithQualifiers Include="corert">
<Parent>any</Parent>
</RuntimeGroupWithQualifiers>
</ItemGroup>
<Target Name="GenerateRuntimeJson" BeforeTargets="CreatePackage">
<!-- Generates a Runtime graph using RuntimeGroups and diffs it with the graph described by runtime.json and runtime.compatibility.json
Specifying UpdateRuntimeFiles=true skips the diff and updates those files.
The graph can be visualized using the generated dmgl -->
<MakeDir Directories="$(PackageReportDir)" />
<GenerateRuntimeGraph RuntimeGroups="@(RuntimeGroupWithQualifiers)"
RuntimeJson="runtime.json"
CompatibilityMap="runtime.compatibility.json"
RuntimeDirectedGraph="$(PackageReportDir)$(Id)$(NuspecSuffix)-runtime.json.dgml"
UpdateRuntimeFiles="$(UpdateRuntimeFiles)" />
</Target>
</Project>

View File

@@ -2,8 +2,8 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<!-- for official builds, only build during the AllConfigurations leg -->
<ItemGroup Condition="'$(OfficialBuildId)' == '' Or '$(BuildAllConfigurations)' == 'true'">
<!-- only build during the AllConfigurations leg because it depends on other nupkgs from this leg -->
<ItemGroup Condition="'$(BuildAllConfigurations)' == 'true'">
<Project Include="$(MSBuildProjectName).pkgproj" />
</ItemGroup>

View File

@@ -0,0 +1,57 @@
<?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" />
<PropertyGroup>
<PackageVersion>2.1.0</PackageVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<LibraryPackage>
<Version>4.4.0</Version>
</LibraryPackage>
<PrereleaseLibraryPackage>
<Version>4.5.0</Version>
</PrereleaseLibraryPackage>
</ItemDefinitionGroup>
<ItemGroup>
<PackageIndex Include="$(MSBuildThisFileDirectory)externalIndex.json" />
</ItemGroup>
<ItemGroup>
<LibraryPackage Include="Microsoft.Win32.Registry" />
<LibraryPackage Include="Microsoft.Win32.Registry.AccessControl" />
<LibraryPackage Include="System.CodeDom" />
<LibraryPackage Include="System.Configuration.ConfigurationManager" />
<LibraryPackage Include="System.Data.SqlClient" />
<LibraryPackage Include="System.IO.FileSystem.AccessControl" />
<LibraryPackage Include="System.IO.Packaging" />
<LibraryPackage Include="System.IO.Pipes.AccessControl" />
<LibraryPackage Include="System.IO.Ports" />
<LibraryPackage Include="System.Security.AccessControl" />
<LibraryPackage Include="System.Security.Cryptography.Cng" />
<LibraryPackage Include="System.Security.Cryptography.Pkcs" />
<LibraryPackage Include="System.Security.Cryptography.ProtectedData" />
<LibraryPackage Include="System.Security.Cryptography.Xml" />
<LibraryPackage Include="System.Security.Permissions" />
<LibraryPackage Include="System.Security.Principal.Windows" />
<LibraryPackage Include="System.ServiceProcess.ServiceController" />
<LibraryPackage Include="System.Text.Encoding.CodePages" />
<LibraryPackage Include="System.Threading.AccessControl" />
<LibraryPackage Include="System.ServiceModel.Primitives" />
<LibraryPackage Include="System.ServiceModel.Duplex" />
<LibraryPackage Include="System.ServiceModel.Http" />
<LibraryPackage Include="System.ServiceModel.NetTcp" />
<LibraryPackage Include="System.ServiceModel.Security" />
<PrereleaseLibraryPackage Include="System.Data.Odbc" />
<PrereleaseLibraryPackage Include="System.Drawing.Common" />
</ItemGroup>
<ItemGroup>
<Dependency Include="@(LibraryPackage)" />
<Dependency Include="@(PrereleaseLibraryPackage)" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,34 @@
{
"Packages": {
"System.ServiceModel.Primitives": {
"StableVersions": [
"4.4.0",
"4.3.0"
]
},
"System.ServiceModel.Duplex": {
"StableVersions": [
"4.4.0",
"4.3.0"
]
},
"System.ServiceModel.Http": {
"StableVersions": [
"4.4.0",
"4.3.0"
]
},
"System.ServiceModel.NetTcp": {
"StableVersions": [
"4.4.0",
"4.3.0"
]
},
"System.ServiceModel.Security": {
"StableVersions": [
"4.4.0",
"4.3.0"
]
}
}
}

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<TargetFrameworkName>netcoreapp</TargetFrameworkName>
<TargetFrameworkVersion>2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>2.1</TargetFrameworkVersion>
<TargetFramework>$(TargetFrameworkName)$(TargetFrameworkVersion)</TargetFramework>
<RefBinDir>$(NETCoreAppPackageRefPath)</RefBinDir>
@@ -28,6 +28,7 @@
<ExcludeFromClosure Include="System.Drawing" />
<ExcludeFromClosure Include="System.Net" />
<ExcludeFromClosure Include="System.Security" />
<ExcludeFromClosure Include="System.ServiceModel.Web" />
<ExcludeFromClosure Include="System.ServiceProcess" />
<ExcludeFromClosure Include="System.Transactions" />
<ExcludeFromClosure Include="WindowsBase" />

View File

@@ -4,7 +4,12 @@
<OfficialBuildRID Include="linux-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="linux-arm64">
<Platform>arm64</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="linux-x64" />
<OfficialBuildRID Include="rhel.6-x64" />
<OfficialBuildRID Include="alpine.3.6-x64" />
<OfficialBuildRID Include="osx-x64" />
<OfficialBuildRID Include="win-arm">
<Platform>arm</Platform>
@@ -24,4 +29,4 @@
<Platform>armel</Platform>
</OfficialBuildRID>
</ItemGroup>
</Project>
</Project>

View File

@@ -3,6 +3,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<PackageVersion>4.6.0</PackageVersion>
<TargetFrameworkName>uap</TargetFrameworkName>
<TargetFrameworkVersion>$(UAPvNextVersion)</TargetFrameworkVersion>
<TargetFramework>$(TargetFrameworkName)$(TargetFrameworkVersion)</TargetFramework>
@@ -35,6 +36,7 @@
<ExcludeFromClosure Include="System.Drawing" />
<ExcludeFromClosure Include="System.Net" />
<ExcludeFromClosure Include="System.Security" />
<ExcludeFromClosure Include="System.ServiceModel.Web" />
<ExcludeFromClosure Include="System.ServiceProcess" />
<ExcludeFromClosure Include="System.Transactions" />
<ExcludeFromClosure Include="WindowsBase" />

View File

@@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<PackageVersion>2.1.0</PackageVersion>
<PackageVersion>2.2.0</PackageVersion>
<HarvestStablePackage>false</HarvestStablePackage>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<PackageIndexFileName>packageIndex.json</PackageIndexFileName>

View File

@@ -1 +1 @@
a11ac2ff955dec38fa844ef93c18de3dbe4e0fec
f3f128e745dd276fe999ccec1dd9d48f056ecb9f

View File

@@ -1,8 +0,0 @@
<?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>

View File

@@ -1,185 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" InitialTargets="IncludeFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<PackageVersion>2.1.0</PackageVersion>
<TargetFrameworkName>net</TargetFrameworkName>
<TargetFrameworkVersion>461</TargetFrameworkVersion>
<TargetFramework>$(TargetFrameworkName)$(TargetFrameworkVersion)</TargetFramework>
<RefBinDir>$(NetFxPackageRefPath)</RefBinDir>
<LibBinDir>$(NetFxPackageRuntimePath)</LibBinDir>
<IsFrameworkPackage>true</IsFrameworkPackage>
<IncludeLibFiles>true</IncludeLibFiles>
<!-- ValidatePackage doesn't evaluate our targets/props so it does
not find any of the assets in this package -->
<SkipValidatePackage>true</SkipValidatePackage>
</PropertyGroup>
<ItemGroup>
<StampFile Include="targets\NETStandard.Library.NETFramework.common.props">
<TargetPath>build</TargetPath>
</StampFile>
<File Include="targets\**\*.*" Exclude="@(StampFile)">
<TargetPath>build/%(RecursiveDir)</TargetPath>
</File>
<File Include="$(PlaceHolderFile)">
<TargetPath>build/net471</TargetPath>
</File>
</ItemGroup>
<ItemGroup>
<!-- this file is meant to have dangling references, it's purpose is to force conflicts with
any newer version of the original desktop contracts. -->
<ExcludeFromClosure Include="netfx.force.conflicts" />
</ItemGroup>
<Import Project="$(SourceDir)\shims\netfxreference.props" />
<Target Name="IncludeNETStandardShims">
<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 -->
<RefFile Include="$(NETStandardPackageRefPath)\*.dll" Exclude="@(_excludeShimsRef->'$(NETStandardPackageRefPath)\%(Identity).dll')">
<TargetFramework>$(TargetFramework)</TargetFramework>
</RefFile>
<LibFile Include="$(NETStandardPackageRefPath)\*.dll" Exclude="@(_excludeShimsLib->'$(NETStandardPackageRefPath)\%(Identity).dll')">
<TargetFramework>$(TargetFramework)</TargetFramework>
</LibFile>
</ItemGroup>
</Target>
<Target Name="StampPackageVersion" BeforeTargets="GetFiles" DependsOnTargets="CalculatePackageVersion">
<ItemGroup>
<StampFile>
<StampedFile>$(IntermediateOutputPath)%(StampFile.RelativeDir)%(StampFile.FileName)%(StampFile.Extension)</StampedFile>
</StampFile>
</ItemGroup>
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(StampFile.StampedFile)'))" />
<!-- Update targets templates -->
<WriteLinesToFile
File="%(StampFile.StampedFile)"
Lines="$([System.IO.File]::ReadAllText('%(StampFile.FullPath)').Replace('{PACKAGE_VERSION}', $(PackageVersion)))"
Overwrite="true"/>
<ItemGroup>
<File Include="@(StampFile->'%(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>
<Target Name="AddFrameworkClosureFiles" AfterTargets="ExpandClosureFilesByTargetFramework">
<ItemGroup>
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)netfx/%(Identity).dll')" >
<FileSet>reference-net461</FileSet>
</FrameworkClosureFile>
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)netfx/%(Identity).dll')" >
<FileSet>runtime-net461</FileSet>
</FrameworkClosureFile>
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net462/%(Identity).dll')" >
<FileSet>reference-net462</FileSet>
</FrameworkClosureFile>
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net462/%(Identity).dll')" >
<FileSet>runtime-net462</FileSet>
</FrameworkClosureFile>
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net47/%(Identity).dll')" >
<FileSet>reference-net47</FileSet>
</FrameworkClosureFile>
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net47/%(Identity).dll')" >
<FileSet>runtime-net47</FileSet>
</FrameworkClosureFile>
</ItemGroup>
</Target>
<Target Name="ExpandClosureFilesByTargetFramework"
AfterTargets="GetClosureFiles"
Inputs="%(ClosureFile.FileSet)"
Outputs="batching-on-Closure-metadata">
<ItemGroup>
<_closureFileByFileName Include="@(ClosureFile->'%(FileName)')">
<Original>%(Identity)</Original>
</_closureFileByFileName>
<!-- Create items by framework that fallback to previous framework for non-existent files -->
<!-- this could be done better if we used a test project that imported the actual shipping targets -->
<_closureFileNet461 Include="@(_closureFileByFileName)" Condition="'%(_closureFileByFileName.TargetFramework)' == 'net461'" />
<_closureFileNet462 Include="@(_closureFileByFileName)" Condition="'%(_closureFileByFileName.TargetFramework)' == 'net462'" />
<_closureFileNet462 Include="@(_closureFileNet461)" Exclude="@(_closureFileNet462)" />
<_closureFileNet47 Include="@(_closureFileByFileName)" Condition="'%(_closureFileByFileName.TargetFramework)' == 'net47'" />
<_closureFileNet47 Include="@(_closureFileNet462)" Exclude="@(_closureFileNet47)" />
<!-- remove all the ones we're operating on, we'll replace with framework-specific closure sets -->
<ClosureFile Remove="@(ClosureFile)" />
<ClosureFile Include="@(_closureFileNet461->'%(Original)')">
<FileSet>%(FileSet)-net461</FileSet>
</ClosureFile>
<ClosureFile Include="@(_closureFileNet462->'%(Original)')">
<FileSet>%(FileSet)-net462</FileSet>
</ClosureFile>
<ClosureFile Include="@(_closureFileNet47->'%(Original)')" >
<FileSet>%(FileSet)-net47</FileSet>
</ClosureFile>
</ItemGroup>
</Target>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
<!-- runs as initial target, overrides IncludeFiles in frameworkPackage.targets to define TFM-specific TargetPath
under the build folder -->
<Target Name="IncludeFiles" DependsOnTargets="IncludeNETStandardShims">
<PropertyGroup>
<_projectDirLength>$(ProjectDir.Length)</_projectDirLength>
</PropertyGroup>
<ItemGroup>
<!-- Include refs -->
<File Include="@(RefFile)">
<TargetPath Condition="'%(RefFile.TargetPath)' == ''">build/%(RefFile.TargetFramework)/ref%(RefFile.SubFolder)</TargetPath>
</File>
<!-- Include lib -->
<File Include="@(LibFile)">
<TargetPath Condition="'%(LibFile.TargetPath)' == '' ">build/%(LibFile.TargetFramework)/lib%(LibFile.SubFolder)</TargetPath>
</File>
</ItemGroup>
<ItemGroup>
<!-- Set targetpath for sources to be under src so that it is excluded from the lib package -->
<File Condition="'%(File.IsSourceCodeFile)' == 'true'">
<TargetPath>src</TargetPath>
<TargetPath Condition="$([System.String]::Copy('%(FullPath)').StartsWith('$(ProjectDir)'))">src/$([System.String]::Copy('%(FullPath)').Substring($(_projectDirLength)).Replace('\', '/'))</TargetPath>
</File>
</ItemGroup>
</Target>
</Project>

View File

@@ -1,7 +0,0 @@
<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>

View File

@@ -1,63 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ImportedNETStandardLibraryNETFrameworkCommonTargets>true</ImportedNETStandardLibraryNETFrameworkCommonTargets>
</PropertyGroup>
<Choose>
<!-- Allow completely disabling the conflict resolution targets-->
<When Condition="'$(ImplicitlyExpandNETStandardFacades)' != 'true'" />
<!-- Condition here is a hack until https://github.com/dotnet/sdk/issues/534 is fixed -->
<When Condition="'$(TargetFramework)' != '' or '$(TargetFrameworks)' != ''">
<!-- NuGet 4, run after references are resolved -->
<PropertyGroup>
<ImplicitlyExpandNETStandardFacadesAfter>ResolveLockFileReferences</ImplicitlyExpandNETStandardFacadesAfter>
</PropertyGroup>
</When>
<When Condition="'$(ResolveNuGetPackages)' == 'true' and Exists('$(ProjectLockFile)')">
<!-- NuGet 3, run after nuget assets are resolved -->
<PropertyGroup>
<ImplicitlyExpandNETStandardFacadesAfter>ResolveNuGetPackageAssets</ImplicitlyExpandNETStandardFacadesAfter>
</PropertyGroup>
</When>
<Otherwise>
<!-- NuGet 2, run before targets that consume references -->
<PropertyGroup>
<ResolveAssemblyReferencesDependsOn>ImplicitlyExpandNETStandardFacades;$(ResolveAssemblyReferencesDependsOn)</ResolveAssemblyReferencesDependsOn>
<PrepareResourcesDependsOn>ImplicitlyExpandNETStandardFacades;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<!-- Ensure this runs before conflict resolution since the added files may cause conflicts -->
<HandlePackageFileConflictsDependsOn>ImplicitlyExpandNETStandardFacades;$(HandlePackageFileConflictsDependsOn)</HandlePackageFileConflictsDependsOn>
</PropertyGroup>
<ItemGroup Condition="'$(DontTrimNETStandardLibraryNETFramework)' != 'true'">
<!-- mark this package as trimmable so that files in the same package aren't automatically rooted -->
<TrimmablePackages Include="NETStandard.Library.NETFramework" />
</ItemGroup>
<Target Name="ImplicitlyExpandNETStandardFacades"
AfterTargets="$(ImplicitlyExpandNETStandardFacadesAfter)">
<ItemGroup>
<!-- Remove simple name references if we're directly providing a reference assembly to the compiler. For example,
consider a project with an Reference Include="System", and some NuGet package is providing System.dll.
Simple references can also come from NuGet framework assemblies, hence this statement should occur after
including all computed references. -->
<Reference Remove="%(_NETStandardLibraryNETFrameworkReference.FileName)" />
<Reference Include="@(_NETStandardLibraryNETFrameworkReference)">
<!-- Private = false to make these reference only -->
<Private>false</Private>
<NuGetPackageId>NETStandard.Library.NETFramework</NuGetPackageId>
<NuGetPackageVersion>$(NETStandardLibraryNETFrameworkPackageVersion)</NuGetPackageVersion>
</Reference>
<ReferenceCopyLocalPaths Include="@(_NETStandardLibraryNETFrameworkLib)">
<Private>false</Private>
<NuGetPackageId>NETStandard.Library.NETFramework</NuGetPackageId>
<NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
</ReferenceCopyLocalPaths>
</ItemGroup>
</Target>
</Project>

View File

@@ -1,3 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\$(MSBuildThisFileName).common.props" />
</Project>

View File

@@ -1,11 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(ImplicitlyExpandNETStandardFacades)' == 'true'">
<_NETStandardLibraryNETFrameworkReference Include="$(MSBuildThisFileDirectory)\ref\*.dll"
Exclude="@(_NETStandardLibraryNETFrameworkReference->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
<_NETStandardLibraryNETFrameworkLib Include="$(MSBuildThisFileDirectory)\lib\*.dll"
Exclude="@(_NETStandardLibraryNETFrameworkLib->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
</ItemGroup>
<Import Project="..\$(MSBuildThisFileName).common.targets" Condition="'$(ImportedNETStandardLibraryNETFrameworkCommonTargets)' != 'true'" />
</Project>

View File

@@ -1,3 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\$(MSBuildThisFileName).common.props" />
</Project>

Some files were not shown because too many files have changed in this diff Show More