Debian Codegraph @

external/corefx/pkg/frameworkPackage.targets

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="14.0" InitialTargets="_CheckForFiles;IncludeFiles;SetValidateFramework" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
4 <PropertyGroup>
5 <IsLineupPackage Condition="'$(PackageTargetRuntime)' == '' AND '$(IncludeLibFiles)' != 'true'">true</IsLineupPackage>
6 <PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
7
8 <NETStandardVersion Condition="'$(NETStandardVersion)' == ''">2.0</NETStandardVersion>
9 <NETStandardPackageRefPath Condition="'$(NETStandardPackageRefPath)' == ''">$(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard$(NETStandardVersion)\ref</NETStandardPackageRefPath>
10
11 <IncludeReferenceFiles Condition="'$(IncludeReferenceFiles)' == '' AND '$(PackageTargetRuntime)' == ''">true</IncludeReferenceFiles>
12 <IncludeLibFiles Condition="'$(IncludeLibFiles)' == '' AND '$(PackageTargetRuntime)' != ''">true</IncludeLibFiles>
13 <IncludeNativeFiles Condition="'$(IncludeNativeFiles)' == '' AND '$(PackageTargetRuntime)' != ''">true</IncludeNativeFiles>
14
15 <RefFileTargetPath Condition="'$(RefFileTargetPath)' == ''">ref/$(TargetFramework)</RefFileTargetPath>
16 <LibFileTargetPath Condition="'$(LibFileTargetPath)' == '' AND '$(PackageTargetRuntime)' == ''">lib/$(TargetFramework)</LibFileTargetPath>
17 <LibFileTargetPath Condition="'$(LibFileTargetPath)' == '' AND '$(PackageTargetRuntime)' != ''">runtimes/$(PackageTargetRuntime)/lib/$(TargetFramework)</LibFileTargetPath>
18
19 <NativeFileTargetPath Condition="'$(NativeFileTargetPath)' == '' AND '$(PackageTargetRuntime)' != ''">runtimes/$(PackageTargetRuntime)/native</NativeFileTargetPath>
20 <NativeBinDir Condition="'$(PackageTargetRuntimeSuffix)' == 'aot'">$(NativeBinDir)_aot</NativeBinDir>
21 </PropertyGroup>
22
23 <!-- Bring in ref content from binplaced ref props -->
24 <Import Condition="'$(IncludeReferenceFiles)' == 'true'" Project="$(RefBinDir)\*.props" />
25 <ItemGroup Condition="'$(IncludeReferenceFiles)' == 'true'">
26 <_buildRIDWithMetadata Include="@(BuildRID)">
27 <TargetRuntime>%(Identity)</TargetRuntime>
28 <Version>$(PackageVersion)</Version>
29 </_buildRIDWithMetadata>
30 <Dependency Include="@(_buildRIDWithMetadata->'runtime.%(Identity).$(Id)')" />
31
32 <Dependency Include="Microsoft.NETCore.Platforms">
33 <Version>$(MicrosoftNETCorePlatformsPackageVersion)</Version>
34 <TargetFramework>$(TargetFramework)</TargetFramework>
35 </Dependency>
36
37 <!-- Include the update to v1 lineup package, which now has no runtime package mappings.
38 This will reduce the number of packages downloaded when mixing v1 and later
39 packages as well as reduce our dependence on conflict resolution for dropping
40 those v1 runtime packages -->
41 <Dependency Condition="'$(IsLineupPackage)' == 'true'" Include="Microsoft.NETCore.Targets">
42 <Version>2.0.0</Version>
43 <TargetFramework>$(TargetFramework)</TargetFramework>
44 </Dependency>
45 </ItemGroup>
46
47 <!-- Bring in lib content from binplaced lib props -->
48 <Import Condition="'$(IncludeLibFiles)' == 'true'" Project="$(LibBinDir)\*.props" />
49
50 <ItemGroup Condition="'$(IncludeNativeFiles)' == 'true'">
51 <!-- Include native -->
52 <ExcludeNative Include="$(NativeBinDir)/*.lib" />
53 <NativeFile Include="$(NativeBinDir)/*.*" Exclude="@(ExcludeNative)" />
54 <!-- force a missing file if native build is absent -->
55 <NativeFile Include="$(NativeBinDir)/MISSING_NATIVE_BUILD" Condition="'@(NativeFile)' == ''" />
56 </ItemGroup>
57
58 <Target Name="_CheckForFiles">
59 <Error Condition="'$(IncludeReferenceFiles)' == 'true' AND '@(RefFile)' == ''"
60 Text="IncludeReferenceFiles was specified but no file props were found in '$(RefBinDir)'" />
61 <Error Condition="'$(IncludeLibFiles)' == 'true' AND '@(LibFile)' == ''"
62 Text="IncludeLibFiles was specified but no file props were found in '$(LibBinDir)'" />
63 <Error Condition="'$(IncludeNativeFiles)' == 'true' AND '@(NativeFile)' == ''"
64 Text="IncludeNativeFiles was specified but no files were found in '$(NativeBinDir)'" />
65 </Target>
66
67 <Target Name="IncludeFiles">
68 <PropertyGroup>
69 <_projectDirLength>$(ProjectDir.Length)</_projectDirLength>
70 </PropertyGroup>
71
72 <ItemGroup>
73 <!-- Include refs -->
74 <File Include="@(RefFile)">
75 <TargetPath Condition="'%(RefFile.TargetPath)' == ''">$(RefFileTargetPath)%(RefFile.SubFolder)</TargetPath>
76 </File>
77
78 <!-- Include lib -->
79 <File Include="@(LibFile)">
80 <TargetPath Condition="'%(LibFile.TargetPath)' == '' ">$(LibFileTargetPath)%(LibFile.SubFolder)</TargetPath>
81 </File>
82
83 <File Include="@(NativeFile)">
84 <TargetPath>$(NativeFileTargetPath)</TargetPath>
85 </File>
86 </ItemGroup>
87
88 <ItemGroup Condition="'$(IncludeSymbolsInPackage)' != 'true'">
89 <!-- Set targetpath for sources to be under src so that it is excluded from the lib package -->
90 <File Condition="'%(File.IsSourceCodeFile)' == 'true'">
91 <TargetPath>src</TargetPath>
92 <TargetPath Condition="$([System.String]::Copy('%(FullPath)').StartsWith('$(ProjectDir)'))">src/$([System.String]::Copy('%(FullPath)').Substring($(_projectDirLength)).Replace('\', '/'))</TargetPath>
93 </File>
94 </ItemGroup>
95 </Target>
96
97 <Target Name="GetClosureFiles">
98 <!-- sets up ClosureFile items that are organized by file-set -->
99 <ItemGroup>
100 <ClosureFile Include="@(RefFile)" Condition="Exists('%(FullPath)') AND ('%(Extension)' == '.dll' OR '%(Extension)' == '$(LibraryFileExtension)')" >
101 <FileSet>reference</FileSet>
102 </ClosureFile>
103
104 <ClosureFile Include="@(LibFile);@(NativeFile)" Condition="Exists('%(FullPath)') AND ('%(Extension)' == '.dll' OR '%(Extension)' == '$(LibraryFileExtension)')">
105 <FileSet>runtime</FileSet>
106 </ClosureFile>
107 </ItemGroup>
108 </Target>
109
110 <Target Name="VerifyClosure"
111 DependsOnTargets="GetClosureFiles"
112 AfterTargets="Build"
113 Inputs="%(ClosureFile.FileSet)"
114 Outputs="batching-on-FileSet-metadata">
115 <ItemGroup>
116 <_closureFileNames Include="@(ClosureFile->'%(FileName)')">
117 <Original>%(Identity)</Original>
118 </_closureFileNames>
119 <_closureFileNamesFiltered Include="@(_closureFileNames)" Exclude="@(ExcludeFromClosure)"/>
120 <_closureFileFiltered Include="@(_closureFileNamesFiltered->'%(Original)')"/>
121 </ItemGroup>
122
123 <Message Importance="High" Text="Verifying closure of $(Id) %(ClosureFile.FileSet) assemblies" />
124 <VerifyClosure Sources="@(_closureFileFiltered)"
125 IgnoredReferences="@(IgnoredReference)"
126 DependencyGraphFilePath="$(PackageReportDir)$(Id)$(NuspecSuffix)-%(ClosureFile.FileSet).dgml" />
127
128 </Target>
129
130 <Target Name="VerifyDuplicateTypes"
131 DependsOnTargets="GetClosureFiles"
132 AfterTargets="Build"
133 Inputs="%(ClosureFile.FileSet)"
134 Outputs="batching-on-FileSet-metadata">
135 <PropertyGroup>
136 <_fileSet>%(ClosureFile.FileSet)</_fileSet>
137 </PropertyGroup>
138 <ItemGroup>
139 <_dupTypeFileName Include="@(ClosureFile->'%(FileName)')">
140 <Original>%(Identity)</Original>
141 </_dupTypeFileName>
142 <_dupTypeFileName Include="@(FrameworkClosureFile->'%(FileName)')" Exclude="@(_dupTypeFileName)" Condition="'$(_fileSet)' == '%(FrameworkClosureFile.FileSet)'">
143 <Original>%(Identity)</Original>
144 </_dupTypeFileName>
145 <_dupTypeFileNamesFiltered Include="@(_dupTypeFileName)" Exclude="@(ExcludeFromDuplicateTypes)"/>
146 <_dupTypeFileFiltered Include="@(_dupTypeFileNamesFiltered->'%(Original)')"/>
147 </ItemGroup>
148
149 <Message Importance="High" Text="Verifying no duplicate types in $(Id) %(ClosureFile.FileSet) assemblies" />
150 <VerifyTypes Sources="@(_dupTypeFileFiltered)"
151 IgnoredTypes="@(IgnoredDuplicateType)" />
152
153 </Target>
154
155 <Target Name="VerifyNETStandard"
156 DependsOnTargets="GetClosureFiles"
157 AfterTargets="Build"
158 Inputs="%(ClosureFile.FileSet)"
159 Outputs="batching-on-FileSet-metadata">
160
161 <PropertyGroup>
162 <_fileSet>%(ClosureFile.FileSet)</_fileSet>
163 </PropertyGroup>
164
165 <ItemGroup>
166 <_NETStandardFile Include="$(NETStandardPackageRefPath)\*.dll" />
167
168 <!-- Suppress errors caused by removing S.CM.C shim from inbox -->
169 <SuppressNETStandardMissingFile Include="System.ComponentModel.Composition" />
170
171 <_NETStandardMissingFile Include="@(_NETStandardFile->'%(FileName)')" Exclude="@(ClosureFile->'%(FileName)')" />
172 <_NETStandardMissingFileError Include="@(_NETStandardMissingFile)" Exclude="@(SuppressNETStandardMissingFile)" />
173 <_NETStandardSuppressedMissingFile Include="@(_NETStandardMissingFile)" Exclude="@(_NETStandardMissingFileError)" />
174 </ItemGroup>
175
176 <Error Condition="'@(_NETStandardFile)' == ''"
177 Text="Could not locate NETStandard package content at '$(NETStandardPackageRefPath)'" />
178
179 <Message Condition="'@(_NETStandardSuppressedMissingFile)' != ''" Text="Files'@(_NETStandardSuppressedMissingFile)' are part of '$(NETStandardLibraryPackageId)' but missing from this package's $(_fileSet) files. This error has been suppressed." />
180 <Error Condition="'@(_NETStandardMissingFileError)' != ''" Text="Files '@(_NETStandardMissingFileError)' are part of '$(NETStandardLibraryPackageId)' but missing from this package's $(_fileSet) files." />
181 </Target>
182
183 <Target Name="GetSymbolPackageFiles" BeforeTargets="GetPackageFiles">
184 <ItemGroup>
185 <File>
186 <IsSymbolFile Condition="'%(Extension)' == '.pdb'">true</IsSymbolFile>
187 <IsSymbolFile Condition="'$(SymbolFileExtension)' != '' AND'%(Extension)' == '$(SymbolFileExtension)'">true</IsSymbolFile>
188 </File>
189 </ItemGroup>
190 </Target>
191
192 <Target Name="SetValidateFramework">
193 <ItemGroup>
194 <!-- Update validation with locally authored RID list -->
195 <DefaultValidateFramework Remove="$(TargetFramework)"/>
196 <DefaultValidateFramework Include="$(TargetFramework)">
197 <RuntimeIDs>@(BuildRID)</RuntimeIDs>
198 </DefaultValidateFramework>
199 </ItemGroup>
200 </Target>
201 </Project>