@@ -34,25 +34,21 @@ function CrossGen([string] $runtime, [string] $publishTarget, [string] $privateS
3434 $symbolsPath = Join-Path $publishTarget " Symbols"
3535 new-item - itemtype directory - path $symbolsPath
3636
37- DownloadNupkg " https://dotnet.myget.org/F/dotnet-core/api/v2/package/runtime.$runtime .Microsoft.NETCore.Jit/2.1.0-rtm-26528-02" @ (" runtimes\$runtime \native\clrjit.dll" ) @ (" $publishTarget \download\clrjit" )
38- DownloadNupkg " https://dotnet.myget.org/F/dotnet-core/api/v2/package/runtime.$runtime .Microsoft.NETCore.Runtime.CoreCLR/2.1.0-rtm-26528-02" @ (" tools\crossgen.exe" ) @ (" $publishTarget \download\crossgen" )
39- DownloadNupkg " https://www.nuget.org/api/v2/package/Microsoft.Build.Tasks.Core/15.1.1012" @ (" lib\netstandard1.3\Microsoft.Build.Tasks.Core.dll" ) @ (" $selfContained " )
40- DownloadNupkg " https://www.nuget.org/api/v2/package/Microsoft.Build.Utilities.Core/15.1.1012" @ (" lib\netstandard1.3\Microsoft.Build.Utilities.Core.dll" ) @ (" $selfContained " )
41- if ($runtime -eq " win-x86" ) {
42- DownloadNupkg " https://dotnet.myget.org/F/aspnetcore-dev/api/v2/package/Microsoft.AspNetCore.AspNetCoreModuleV2/2.1.0-a-oob-2-1-oob-17297" @ (" contentFiles\any\any\x86\aspnetcorev2.dll" , " contentFiles\any\any\x86\aspnetcorev2_inprocess.dll" ) @ (" $privateSiteExtensionPath \ancm" , " $privateSiteExtensionPath \ancm" )
43- } else {
44- DownloadNupkg " https://dotnet.myget.org/F/aspnetcore-dev/api/v2/package/Microsoft.AspNetCore.AspNetCoreModuleV2/2.1.0-a-oob-2-1-oob-17297" @ (" contentFiles\any\any\x64\aspnetcorev2.dll" , " contentFiles\any\any\x64\aspnetcorev2_inprocess.dll" ) @ (" $privateSiteExtensionPath \ancm" , " $privateSiteExtensionPath \ancm" )
45- }
37+ # https://dotnet.myget.org/feed/dotnet-core/package/nuget/runtime.win-x86.Microsoft.NETCore.Jit
38+ DownloadNupkg " https://dotnet.myget.org/F/dotnet-core/api/v2/package/runtime.$runtime .Microsoft.NETCore.Jit/2.2.0-servicing-26820-03" @ (" runtimes\$runtime \native\clrjit.dll" ) @ (" $publishTarget \download\clrjit" )
39+ # https://dotnet.myget.org/feed/dotnet-core/package/nuget/runtime.win-x86.Microsoft.NETCore.Runtime.CoreCLR
40+ DownloadNupkg " https://dotnet.myget.org/F/dotnet-core/api/v2/package/runtime.$runtime .Microsoft.NETCore.Runtime.CoreCLR/2.2.0-servicing-26820-03" @ (" tools\crossgen.exe" ) @ (" $publishTarget \download\crossgen" )
4641
4742 # Publish self-contained app with all required dlls for crossgen
4843 dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - r $runtime - o " $selfContained " - v q / p:BuildNumber= $buildNumber
4944
5045 # Modify web.config for inproc
51- dotnet tool install - g dotnet- xdt -- version 2.1 .0 2> $null
46+ dotnet tool install - g dotnet- xdt -- version 2.2 .0 2> $null
5247 dotnet- xdt - s " $privateSiteExtensionPath \web.config" - t " $privateSiteExtensionPath \web.InProcess.$runtime .xdt" - o " $privateSiteExtensionPath \web.config"
5348
5449 $successfullDlls = @ ()
5550 $failedDlls = @ ()
51+
5652 Get-ChildItem $privateSiteExtensionPath - Filter * .dll |
5753 Foreach-Object {
5854 $prm = " /JITPath" , " $publishTarget \download\clrjit\clrjit.dll" , " /Platform_Assemblies_Paths" , " $selfContained " , " /nologo" , " /in" , $_.FullName
@@ -61,11 +57,6 @@ function CrossGen([string] $runtime, [string] $publishTarget, [string] $privateS
6157 $prm += " /out"
6258 $prm += Join-Path $privateSiteExtensionPath " Microsoft.Azure.WebJobs.Script.WebHost.ni.dll"
6359 }
64- # Fix output for System.Private.CoreLib.dll
65- if ($_.FullName -like " *System.Private.CoreLib.dll" ) {
66- $prm += " /out"
67- $prm += Join-Path $privateSiteExtensionPath " System.Private.CoreLib.ni.dll"
68- }
6960
7061 & $crossGen $prm >> $buildOutput \crossgenout.$runtime.txt 2>&1
7162
@@ -81,7 +72,7 @@ function CrossGen([string] $runtime, [string] $publishTarget, [string] $privateS
8172 $failedDlls += [io.path ]::GetFileName($_.FullName )
8273 }
8374 }
84-
75+
8576 # print results of crossgen process
8677 $successfullDllsCount = $successfullDlls.length
8778 $failedDllsCount = $failedDlls.length
@@ -168,12 +159,7 @@ function BuildOutput([string] $runtime) {
168159 $siteExtensionPath = " $publishTarget \SiteExtensions"
169160 $privateSiteExtensionPath = " $siteExtensionPath \Functions"
170161
171- if ($runtime -eq " win-x86" -or $runtime -eq " " ) {
172- dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - o " $privateSiteExtensionPath " - v q / p:BuildNumber= $buildNumber / p:IsPackable= false - c Release
173- } else {
174- # There are no preinstalled 'x64 .NET Core'/'x64 ASP.NET Core' on the stamp so we we need to build self-contained package for x64.
175- dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - r $runtime - o " $privateSiteExtensionPath " - v q / p:BuildNumber= $buildNumber / p:IsPackable= false - c Release
176- }
162+ dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - o " $privateSiteExtensionPath " - v q / p:BuildNumber= $buildNumber / p:IsPackable= false - c Release
177163
178164 # replace IL dlls with crossgen dlls
179165 if (! [string ]::IsNullOrEmpty($runtime )) {
@@ -198,27 +184,11 @@ function CreateZips([string] $runtimeSuffix) {
198184 # Project cleanup (trim some project files - this should be revisited)
199185 cleanExtension " "
200186
201- # Prepare private "no-runtime" with custom xdt
202- $currentXdtPath = " $privateSiteExtensionPath \applicationHost.xdt"
203- $tempXdtDir = " $buildOutput \xdt-temp"
204- $tempPublicXdtPath = " $tempXdtDir \applicationHost-public.xdt"
205187
206- # Make a temp location
207- New-Item - Itemtype directory - path $tempXdtDir - ErrorAction SilentlyContinue
208-
209- # Move the current (public) xdt to the temp location
210- Move-Item $currentXdtPath $tempPublicXdtPath
211-
212- # Drop in the private XDT
213- Copy-Item .\src\WebJobs.Script.WebHost\applicationHost- private.xdt $currentXdtPath
214188
215189 # Make the zip
216190 ZipContent $publishTarget " $buildOutput \Functions.Private.$extensionVersion$runtimeSuffix .zip"
217191
218- # Restore the public XDT
219- Move-Item $tempPublicXdtPath $currentXdtPath - Force
220-
221- Remove-Item $tempXdtDir - Recurse
222192 } else {
223193 # Project cleanup (trim some project files - this should be revisited)
224194 cleanExtension " 32bit"
0 commit comments