blob: de54df727528bca72fdd6593d45f8b23c21199f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsLineupPackage Condition="'$(PackageTargetRuntime)' == '' AND '$(IncludeLibFiles)' != 'true'">true</IsLineupPackage>
<PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
<!-- these packages don't follow the patterns expected by package validation -->
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
<NETStandardVersion Condition="'$(NETStandardVersion)' == ''">2.0</NETStandardVersion>
<IncludeReferenceFiles Condition="'$(IncludeReferenceFiles)' == '' AND '$(PackageTargetRuntime)' == ''">true</IncludeReferenceFiles>
<IncludeLibFiles Condition="'$(IncludeLibFiles)' == '' AND '$(PackageTargetRuntime)' != ''">true</IncludeLibFiles>
<IncludeNativeFiles Condition="'$(IncludeNativeFiles)' == '' AND '$(PackageTargetRuntime)' != ''">true</IncludeNativeFiles>
<RefFileTargetPath Condition="'$(RefFileTargetPath)' == ''">ref/$(TargetFramework)</RefFileTargetPath>
<LibFileTargetPath Condition="'$(LibFileTargetPath)' == '' AND '$(PackageTargetRuntime)' == ''">lib/$(TargetFramework)</LibFileTargetPath>
<LibFileTargetPath Condition="'$(LibFileTargetPath)' == '' AND '$(PackageTargetRuntime)' != ''">runtimes/$(PackageTargetRuntime)/lib/$(TargetFramework)</LibFileTargetPath>
<NativeFileTargetPath Condition="'$(NativeFileTargetPath)' == '' AND '$(PackageTargetRuntime)' != ''">runtimes/$(PackageTargetRuntime)/native</NativeFileTargetPath>
</PropertyGroup>
<!-- Bring in ref content from binplaced ref props -->
<Import Condition="'$(IncludeReferenceFiles)' == 'true'" Project="$(RefBinDir)\*.props" />
<ItemGroup Condition="'$(IncludeReferenceFiles)' == 'true'">
<!-- Include refs -->
<File Include="@(RefFile)">
<TargetPath Condition="'%(File.TargetPath)' == ''">$(RefFileTargetPath)</TargetPath>
</File>
<!-- force a missing file if ref build is absent -->
<File Include="$(RefBinDir)/MISSING_REF_BUILD" Condition="'@(RefFile)' == ''" />
<_buildRIDWithMetadata Include="@(BuildRID)">
<TargetRuntime>%(Identity)</TargetRuntime>
<Version>$(PackageVersion)</Version>
</_buildRIDWithMetadata>
<Dependency Include="@(_buildRIDWithMetadata->'runtime.%(Identity).$(Id)')" />
<Dependency Include="Microsoft.NETCore.Platforms">
<Version>$(PlatformPackageVersion)</Version>
</Dependency>
</ItemGroup>
<!-- Bring in lib content from binplaced lib props -->
<Import Condition="'$(IncludeLibFiles)' == 'true'" Project="$(LibBinDir)\*.props" />
<ItemGroup Condition="'$(IncludeLibFiles)' == 'true'">
<!-- Include lib -->
<File Include="@(LibFile)">
<TargetPath Condition="'%(File.TargetPath)' == ''">$(LibFileTargetPath)</TargetPath>
</File>
<!-- force a missing file if lib build is absent -->
<File Include="$(LibBinDir)/MISSING_LIB_BUILD" Condition="'@(LibFile)' == ''" />
</ItemGroup>
<ItemGroup Condition="'$(IncludeNativeFiles)' == 'true'">
<!-- Include native -->
<ExcludeNative Include="$(NativeBinDir)/*.lib" />
<NativeFile Include="$(NativeBinDir)/*.*" Exclude="@(ExcludeNative)">
<TargetPath>$(NativeFileTargetPath)</TargetPath>
</NativeFile>
<File Include="@(NativeFile)" />
<!-- force a missing file if native build is absent -->
<File Include="$(NativeBinDir)/MISSING_NATIVE_BUILD" Condition="'@(NativeFile)' == ''" />
</ItemGroup>
<Target Name="_getFinalFilesExisting">
<ItemGroup>
<_refFileExisting Include="@(File)" Condition="Exists('%(FullPath)') AND $([System.String]::new('%(File.TargetPath)').StartsWith('ref'))" />
<_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')))" />
<_runtimeFileNames Include="@(_runtimeFileExisting -> '%(FileName)')">
<Original>%(_runtimeFileExisting.Identity)</Original>
</_runtimeFileNames>
<_runtimeFileNamesFiltered Include="@(_runtimeFileNames)" Exclude="@(ExcludeFromClosure)" />
<_runtimeFilesFiltered Include="@(_runtimeFileNamesFiltered->'%(Original)')" />
</ItemGroup>
<PropertyGroup>
<_hasRefFiles Condition="'@(_refFilesFiltered)' != '' and '%(_refFilesFiltered.Extension)' != '._'">true</_hasRefFiles>
<_hasRuntimeFiles Condition="'@(_runtimeFilesFiltered)' != '' AND '%(_runtimeFilesFiltered.Extension)' != '._'">true</_hasRuntimeFiles>
</PropertyGroup>
</Target>
<Target Name="VerifyClosure" DependsOnTargets="_getFinalFilesExisting" AfterTargets="Build">
<Message Condition="'$(_hasRefFiles)' == 'true'" Text="Verifying closure of reference assemblies" />
<VerifyClosure Condition="'$(_hasRefFiles)' == 'true'"
Sources="@(_refFilesFiltered)"
IgnoredReferences="@(IgnoredReference)" />
<Message Condition="'$(_hasRuntimeFiles)' == 'true'" Text="Verifying closure of runtime assemblies" />
<VerifyClosure Condition="'$(_hasRuntimeFiles)' == 'true'"
Sources="@(_runtimeFilesFiltered)"
IgnoredReferences="@(IgnoredReference)" />
</Target>
<Target Name="VerifyNETStandard" DependsOnTargets="_getFinalFilesExisting" AfterTargets="Build">
<ItemGroup>
<_NETStandardFile Include="$(PackagesDir)$(NETStandardPackageId.ToLower())\$(NETStandardPackageVersion)\build\netstandard$(NETStandardVersion)\ref\*.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)' == ''" />
<_NETStandardRefMissingFile Include="@(_NETStandardFile->'%(FileName)')" Exclude="@(_refFileNames)" />
<_NETStandardRefMissingFileError Include="@(_NETStandardRefMissingFile)" Exclude="@(SuppressNETStandardMissingFile)" />
<_NETStandardRefSuppressedMissingFile Include="@(_NETStandardRefMissingFile)" Exclude="@(_NETStandardRefMissingFileError)" />
<_NETStandardRuntimeMissingFile Include="@(_NETStandardFile->'%(FileName)')" Exclude="@(_runtimeFileNames)" />
<_NETStandardRuntimeMissingFileError Include="@(_NETStandardRuntimeMissingFile)" Exclude="@(SuppressNETStandardMissingFile)" />
<_NETStandardRuntimeSuppressedMissingFile Include="@(_NETStandardRuntimeMissingFile)" Exclude="@(_NETStandardRuntimeMissingFileError)" />
</ItemGroup>
<Message Condition="'$(_hasRefFiles)' == 'true' AND '@(_NETStandardRefSuppressedMissingFile)' != ''" Text="Files'@(_NETStandardRefSuppressedMissingFile)' are part of '$(NETStandardPackageId)' but missing from this package. This error has been suppressed." />
<Error Condition="'$(_hasRefFiles)' == 'true' AND '@(_NETStandardRefMissingFileError)' != ''" Text="Files '@(_NETStandardRefMissingFileError)' are part of '$(NETStandardPackageId)' but missing from this package." />
<Message Condition="'$(_hasRuntimeFiles)' == 'true' AND '@(_NETStandardRuntimeSuppressedMissingFile)' != ''" Text="Files'@(_NETStandardRuntimeSuppressedMissingFile)' are part of '$(NETStandardPackageId)' but missing from this package. This error has been suppressed." />
<Error Condition="'$(_hasRuntimeFiles)' == 'true' AND '@(_NETStandardRuntimeMissingFileError)' != ''" Text="Files '@(_NETStandardRuntimeMissingFileError)' are part of '$(NETStandardPackageId)' but missing from this package." />
</Target>
<Target Name="GetSymbolPackageFiles" BeforeTargets="GetPackageFiles">
<ItemGroup>
<File>
<IsSymbolFile Condition="'%(Extension)' == '.pdb'">true</IsSymbolFile>
<IsSymbolFile Condition="'$(SymbolFileExtension)' != '' AND'%(Extension)' == '$(SymbolFileExtension)'">true</IsSymbolFile>
</File>
</ItemGroup>
</Target>
</Project>
|