|
4 | 4 | <Import Project="eng/Versions.props" Condition="'$(OfflineBuild)' != 'true'" />
|
5 | 5 |
|
6 | 6 | <UsingTask AssemblyFile="$(LeakDetectionTasksAssembly)" TaskName="CheckForPoison" />
|
7 |
| - <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="CopyReferenceOnlyPackages" /> |
8 | 7 | <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="WriteUsageBurndownData" />
|
9 | 8 | <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceTextInFile" />
|
10 | 9 |
|
|
53 | 52 | <RemoveDir Directories="$(BaseOutputPath)" />
|
54 | 53 | </Target>
|
55 | 54 |
|
56 |
| - <!-- |
57 |
| - Workaround: Skip Windows_NT. |
58 |
| -
|
59 |
| - When trying to CopyReferenceOnlyPackages, it gets errors like: |
60 |
| -
|
61 |
| - System.IO.IOException: The process cannot access the file |
62 |
| - '<root>\packages\microsoft.codeanalysis.compilers\2.6.0-beta3-62316-02\microsoft.codeanalysis.compilers.nuspec' |
63 |
| - because it is being used by another process. |
64 |
| -
|
65 |
| - We don't support producing a tarball on Windows, so there's little value in fixing this. |
66 |
| - --> |
67 |
| - <Target Name="CopyAndDisassembleReferenceOnlyPackages" |
68 |
| - AfterTargets="Build" |
69 |
| - Condition="'$(OfflineBuild)' != 'true' and '$(ArchiveDownloadedPackages)' == 'true' and '$(OS)' != 'Windows_NT'"> |
70 |
| - |
71 |
| - <CopyReferenceOnlyPackages |
72 |
| - PackageCacheDir="$(PackagesDir)" |
73 |
| - DllDestinationDir="$(ReferencePackagesSourceDir)" |
74 |
| - IdentifiedPackagesDir="$(ReferencePackagesToDeleteDir)" |
75 |
| - DestinationDir="$(ReferencePackagesStagingDir)" |
76 |
| - /> |
77 |
| - |
78 |
| - <!-- Ildasm has trouble writing to paths that are longer than 260 chars. (see https://github.com/dotnet/coreclr/issues/20397) |
79 |
| - Create a temporary path to write il output which will then be copied back to the reference-packages/source dir. |
80 |
| - --> |
81 |
| - <PropertyGroup> |
82 |
| - <TempPath>$([System.IO.Path]::GetTempPath())</TempPath> |
83 |
| - <IldasmTempOutputFolderName>$([System.IO.Path]::GetRandomFileName())</IldasmTempOutputFolderName> |
84 |
| - <IldasmTempOutputPath>$([System.IO.Path]::Combine($(TempPath),$(IldasmTempOutputFolderName)))/</IldasmTempOutputPath> |
85 |
| - </PropertyGroup> |
86 |
| - |
87 |
| - <ItemGroup> |
88 |
| - <ReferenceOnlyPackages Include="$(ReferencePackagesToDeleteDir)**/*.nupkg" /> |
89 |
| - <ReferenceOnlyPackageDlls Include="$(ReferencePackagesSourceDir)**/*.dll" /> |
90 |
| - </ItemGroup> |
91 |
| - |
92 |
| - <!-- Temporary workaround to exclude dlls that can't be round-tripped, until Aspnet is built |
93 |
| - They'll end up in the source directory as dlls for now |
94 |
| - --> |
95 |
| - <ItemGroup> |
96 |
| - <!-- Microsoft.AspNet.App DLLs that include .resource files --> |
97 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Antiforgery.dll" /> |
98 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Authentication.OAuth.dll" /> |
99 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Authentication.dll" /> |
100 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Authorization.dll" /> |
101 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Cors.dll" /> |
102 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Cryptography.Internal.dll" /> |
103 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.DataProtection.Abstractions.dll" /> |
104 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.DataProtection.Extensions.dll" /> |
105 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.DataProtection.dll" /> |
106 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Diagnostics.dll" /> |
107 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Hosting.dll" /> |
108 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Http.Abstractions.dll" /> |
109 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Identity.dll" /> |
110 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Localization.dll" /> |
111 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.Abstractions.dll" /> |
112 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.Core.dll" /> |
113 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.Cors.dll" /> |
114 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.DataAnnotations.dll" /> |
115 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.Formatters.Xml.dll" /> |
116 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.Razor.dll" /> |
117 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.RazorPages.dll" /> |
118 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.TagHelpers.dll" /> |
119 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Mvc.ViewFeatures.dll" /> |
120 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Authorization.Policy.dll" /> |
121 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Razor.Runtime.dll" /> |
122 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Rewrite.dll" /> |
123 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Routing.dll" /> |
124 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.HttpSys.dll" /> |
125 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.IIS.dll" /> |
126 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.IIS.CoreStrings.dll" /> |
127 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.Kestrel.Core.dll" /> |
128 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.Kestrel.Core.CoreStrings.dll" /> |
129 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketsStrings.dll" /> |
130 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll" /> |
131 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.Session.dll" /> |
132 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.StaticFiles.dll" /> |
133 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.AspNetCore.WebUtilities.dll" /> |
134 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.Binder.dll" /> |
135 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.CommandLine.dll" /> |
136 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.FileExtensions.dll" /> |
137 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.Ini.dll" /> |
138 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.Json.dll" /> |
139 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.dll" /> |
140 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.UserSecrets.dll" /> |
141 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Configuration.Xml.dll" /> |
142 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.DependencyInjection.Abstractions.dll" /> |
143 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.DependencyInjection.dll" /> |
144 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.DependencyModel.dll" /> |
145 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Http.dll" /> |
146 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Identity.Core.dll" /> |
147 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Localization.dll" /> |
148 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Logging.Abstractions.dll" /> |
149 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Logging.Abstractions.Resource.dll" /> |
150 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Options.dll" /> |
151 |
| - <ReferenceOnlyPackageDlls Remove="$(ReferencePackagesSourceDir)**/Microsoft.Extensions.Primitives.dll" /> |
152 |
| - </ItemGroup> |
153 |
| - <!-- End Temporary workaround --> |
154 |
| - |
155 |
| - <Message Importance="High" Text="Reference-only Packages:" /> |
156 |
| - <Message Importance="High" Text="%(ReferenceOnlyPackages.Identity)" /> |
157 |
| - |
158 |
| - <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Disassembling @(ReferenceOnlyPackageDlls->Count()) dlls" /> |
159 |
| - <MakeDir Directories="$(IldasmTempOutputPath)%(ReferenceOnlyPackageDlls.RecursiveDir)" /> |
160 |
| - <Exec Command="$(IldasmPath) %(ReferenceOnlyPackageDlls.Identity) -all -out=$(IldasmTempOutputPath)%(ReferenceOnlyPackageDlls.RecursiveDir)%(ReferenceOnlyPackageDlls.Filename).il" /> |
161 |
| - <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Disassembly done." /> |
162 |
| - |
163 |
| - <ItemGroup> |
164 |
| - <IlSourceFiles Include="$(IldasmTempOutputPath)/**/*.il" /> |
165 |
| - <OldLicenseFiles Include="$(ReferencePackagesStagingDir)/**/dotnet_library_license.txt" /> |
166 |
| - <OldLicenseFiles Include="$(ReferencePackagesStagingDir)/**/License.rtf" /> |
167 |
| - <RefAssyNuspecFiles Include="$(ReferencePackagesStagingDir)/**/*.nuspec" /> |
168 |
| - </ItemGroup> |
169 |
| - |
170 |
| - <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Copying @(IlSourceFiles->Count()) IL source files" /> |
171 |
| - <Copy SourceFiles="@(IlSourceFiles)" DestinationFiles="$(ReferencePackagesSourceDir)%(IlSourceFiles.RecursiveDir)%(IlSourceFiles.Filename).il" /> |
172 |
| - <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Copying IL source files done." /> |
173 |
| - |
174 |
| - <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Deleting disassembled dlls and temp il source" /> |
175 |
| - <Delete Files="@(ReferenceOnlyPackageDlls)" /> |
176 |
| - <RemoveDir Directories="$(IldasmTempOutputPath)" /> |
177 |
| - <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Deleting disassembled dlls and temp il source done." /> |
178 |
| - |
179 |
| - <!-- Update licenseUrl to MIT license where needed in nuspec files --> |
180 |
| - <ReplaceTextInFile InputFile="%(RefAssyNuspecFiles.Identity)" |
181 |
| - OldText="http://go.microsoft.com/fwlink/?LinkId=329770" |
182 |
| - NewText="https://microsoft.mit-license.org/" /> |
183 |
| - <ReplaceTextInFile InputFile="%(RefAssyNuspecFiles.Identity)" |
184 |
| - OldText="https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm" |
185 |
| - NewText="https://microsoft.mit-license.org/" /> |
186 |
| - <ReplaceTextInFile InputFile="%(RefAssyNuspecFiles.Identity)" |
187 |
| - OldText="http://go.microsoft.com/fwlink/?LinkId=529443" |
188 |
| - NewText="https://microsoft.mit-license.org/" /> |
189 |
| - </Target> |
190 |
| - |
191 |
| - <Target Name="ReplaceLicenseFiles" |
192 |
| - AfterTargets="CopyAndDisassembleReferenceOnlyPackages" |
193 |
| - Outputs="%(OldLicenseFiles.Identity)" |
194 |
| - Condition="'$(OfflineBuild)' != 'true' and '$(ArchiveDownloadedPackages)' == 'true' and '$(OS)' != 'Windows_NT'"> |
195 |
| - <!-- Create Item of all unique directories containing old licenses --> |
196 |
| - <CreateItem Include="%(OldLicenseFiles.RelativeDir)"> |
197 |
| - <Output TaskParameter="Include" ItemName="DestinationDirs" /> |
198 |
| - </CreateItem> |
199 |
| - |
200 |
| - <PropertyGroup> |
201 |
| - <DestinationDirIdentity>%(DestinationDirs.Identity)</DestinationDirIdentity> |
202 |
| - </PropertyGroup> |
203 |
| - <ItemGroup> |
204 |
| - <NewLicenseFile Include="$(ProjectDir)LICENSE.txt" /> |
205 |
| - </ItemGroup> |
206 |
| - <Copy SourceFiles="@(NewLicenseFile)" DestinationFiles="@(NewLicenseFile->'$(DestinationDirIdentity)%(RecursiveDir)%(Filename)%(Extension)')" /> |
207 |
| - |
208 |
| - <Delete Files="@(OldLicenseFiles)" /> |
209 |
| - </Target> |
210 |
| - |
211 | 55 | <Target Name="DownloadSourceBuildReferencePackages"
|
212 | 56 | AfterTargets="Build"
|
213 | 57 | Condition="'$(OfflineBuild)' != 'true' and '$(OS)' != 'Windows_NT' and '$(SkipDownloadingReferencePackages)' != 'true'">
|
|
0 commit comments