Skip to content

Commit 3a400f7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into RemoveExplicitDotnetBootJs
2 parents 32412e6 + 3a1fc4f commit 3a400f7

File tree

9 files changed

+127
-90
lines changed

9 files changed

+127
-90
lines changed

eng/Build.props

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
<_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64'">ARM64</_VcxTargetPlatform>
265265
</PropertyGroup>
266266

267+
<!-- In the VMR, we build the installers entirely via HostingBundle ProjectReferences in pass 2 -->
267268
<ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' ">
268269
<!-- Build the ANCM custom action -->
269270
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
@@ -282,14 +283,6 @@
282283
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
283284
</ItemGroup>
284285

285-
<!--
286-
In a vertical build, only build the MSIs for the current vertical that aren't used in the hosting bundle in the first pass
287-
and build the hosting bundle and its dependencies in the second pass.
288-
-->
289-
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') and '$(_BuildWindowsInstallers)' == 'true'">
290-
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
291-
</ItemGroup>
292-
293286
<ItemGroup>
294287
<ProjectToBuild Condition=" '$(BuildInstallers)' == 'true'" Include="@(InstallerProject)" BuildStep="installer" />
295288
</ItemGroup>

eng/Publishing.props

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,6 @@
3030
<ItemGroup>
3131
<!-- Include our "loose" PDBs when publishing symbols. -->
3232
<FilesToPublishToSymbolServer Include="$(ArtifactsDir)symbols\**\*.pdb" />
33-
34-
<!-- Prepare for _PublishInstallersAndChecksums target. -->
35-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.jar" UploadPathSegment="jar/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
36-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.pom" UploadPathSegment="jar/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
37-
<!-- All builds produce npm assets - only publish them once -->
38-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tgz" UploadPathSegment="npm/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
39-
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.version" UploadPathSegment="Runtime/" Condition="'$(PublishInstallerBaseVersion)' == 'true'" />
40-
41-
<!-- The following installers create checksums -->
42-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.deb" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
43-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.rpm" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
44-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
45-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
46-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
47-
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.zip" Exclude="$(ArtifactsPackagesDir)**\*.wixpack.zip" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
48-
49-
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
50-
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
51-
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" Exclude="$(ArtifactsDir)installers\$(Configuration)\**\*.wixpack.zip" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
52-
53-
<Artifact Include="@(_InstallersToPublish)" Kind="Blob">
54-
<!-- Working around msbuild not being able to negate the result of Contains() outside of targets -->
55-
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) == 'True'">false</IsShipping>
56-
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) != 'True'">true</IsShipping>
57-
</Artifact>
5833
</ItemGroup>
5934

6035
<Target Name="GetNonStableProductVersion">

eng/Signing.props

Lines changed: 35 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,15 @@
22
<!-- See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Signing.md for details. -->
33
<Import Project="Common.props" />
44

5-
<ItemGroup>
6-
<!-- Reset Arcade's defaults. -->
7-
<ItemsToSign Remove="@(ItemsToSign)" />
8-
<ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" />
9-
<FileExtensionSignInfo Remove="@(FileExtensionSignInfo)" />
10-
</ItemGroup>
11-
125
<PropertyGroup>
136
<!-- Use the dotnet certificate for any remaining defaults (e.g. StrongNameSignInfo) -->
147
<UseDotNetCertificate>true</UseDotNetCertificate>
158
</PropertyGroup>
169

17-
<!-- Files that should be always be signed -->
18-
<ItemGroup Label="Common Files to Sign">
19-
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" />
20-
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" />
21-
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.msi" />
22-
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.jar" />
23-
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.zip" />
24-
<ItemsToSign Include="$(VisualStudioSetupOutputPath)**\*.vsix" />
25-
<ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" />
26-
<ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" />
27-
<ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" />
28-
<ItemsToSign Remove="$(ArtifactsPackagesDir)**\*symbols.nupkg" />
29-
</ItemGroup>
30-
3110
<ItemGroup Label="File signing information">
32-
<!--
33-
Map file extensions to a code-sign cert.
34-
"None" means don't sign the file itself, but still scan the contents for signable files.
35-
-->
36-
<FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" />
37-
<FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="MicrosoftDotNet500" />
38-
<FileExtensionSignInfo Include=".dll;.exe" CertificateName="MicrosoftDotNet500" />
39-
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
40-
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
41-
<FileExtensionSignInfo Include=".zip" CertificateName="None" />
42-
<FileExtensionSignInfo Include=".cab" CertificateName="None" />
11+
<!-- Arcade does not set a default for .msi's -->
4312
<FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" />
4413

45-
<!-- Native .dll's. These don't have a public key token, but are from Microsoft and should be signed. -->
46-
<FileSignInfo Include="aspnetcore.dll" CertificateName="MicrosoftDotNet500" />
47-
<FileSignInfo Include="aspnetcorev2_inprocess.dll" CertificateName="MicrosoftDotNet500" />
48-
<FileSignInfo Include="aspnetcorev2_outofprocess.dll" CertificateName="MicrosoftDotNet500" />
49-
<FileSignInfo Include="aspnetcorev2.dll" CertificateName="MicrosoftDotNet500" />
50-
<FileSignInfo Include="blazor-devserver.exe" CertificateName="MicrosoftDotNet500" />
51-
<FileSignInfo Include="dotnet-dev-certs.exe" CertificateName="MicrosoftDotNet500" />
52-
<FileSignInfo Include="dotnet-sql-cache.exe" CertificateName="MicrosoftDotNet500" />
53-
<FileSignInfo Include="dotnet-user-secrets.exe" CertificateName="MicrosoftDotNet500" />
54-
<FileSignInfo Include="dotnet-watch.exe" CertificateName="MicrosoftDotNet500" />
55-
<FileSignInfo Include="dotnet-openapi.exe" CertificateName="MicrosoftDotNet500" />
56-
<FileSignInfo Include="dotnet-user-jwts.exe" CertificateName="MicrosoftDotNet500" />
57-
<FileSignInfo Include="Microsoft.AspNetCore.Blazor.Build.exe" CertificateName="MicrosoftDotNet500" />
58-
<FileSignInfo Include="sni.dll" CertificateName="MicrosoftDotNet500" />
59-
6014
<!-- Third-party components which should be signed. -->
6115
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
6216
<FileSignInfo Include="AngleSharp.dll" CertificateName="3PartySHA2" />
@@ -72,11 +26,9 @@
7226
</PropertyGroup>
7327

7428
<ItemGroup Label="Code sign exclusions">
75-
<!-- We don't need to code sign .js files because they are not used in Windows Script Host. -->
76-
<FileExtensionSignInfo Include=".js" CertificateName="None" />
7729
<!-- We don't produce font files. We rebundle some for using the web browser, so they do not need to be signed. -->
78-
<FileExtensionSignInfo Include=".otf" CertificateName="None" />
79-
<FileExtensionSignInfo Include=".ttf" CertificateName="None" />
30+
<FileExtensionSignInfo Update=".otf" CertificateName="None" />
31+
<FileExtensionSignInfo Update=".ttf" CertificateName="None" />
8032
<!-- This is a text file which doesn't need to be code signed, even though some .mof files can be signed. -->
8133
<FileSignInfo Include="ancm.mof" CertificateName="None" />
8234
<!-- Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. -->
@@ -121,4 +73,36 @@
12173
<FileSignInfo Include="Microsoft.Identity.Client.dll" CertificateName="None" />
12274
</ItemGroup>
12375

76+
<!-- $(InstallersOutputPath), $(SymbolsOutputPath), and $(ChecksumExtensions) are not defined. Root Directory.Build.props is not imported. -->
77+
<ItemGroup>
78+
<!-- Prepare for _PublishInstallersAndChecksums target. -->
79+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.jar" UploadPathSegment="jar/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
80+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.pom" UploadPathSegment="jar/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
81+
<!-- All builds produce npm assets - only publish them once -->
82+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tgz" UploadPathSegment="npm/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
83+
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.version" UploadPathSegment="Runtime/" Condition="'$(PublishInstallerBaseVersion)' == 'true'" />
84+
85+
<!-- The following installers create checksums -->
86+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.deb" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
87+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.rpm" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
88+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
89+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
90+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
91+
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.zip" UploadPathSegment="Runtime/" >
92+
<ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath>
93+
</_InstallersToPublish>
94+
95+
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
96+
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
97+
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" UploadPathSegment="Runtime/" >
98+
<ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath>
99+
</_InstallersToPublish>
100+
101+
<Artifact Include="@(_InstallersToPublish)" Kind="Blob">
102+
<!-- Working around msbuild not being able to negate the result of Contains() outside of targets -->
103+
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) == 'True'">false</IsShipping>
104+
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) != 'True'">true</IsShipping>
105+
</Artifact>
106+
</ItemGroup>
107+
124108
</Project>

eng/build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ if ($BuildManaged -or ($All -and (-not $NoBuildManaged))) {
250250
}
251251
}
252252

253+
$CommandLineArguments = $MSBuildArguments
254+
253255
if ($NoBuildDeps) { $MSBuildArguments += "/p:BuildProjectReferences=false" }
254256

255257
$RunBuild = if ($NoBuild) { $false } else { $true }
@@ -478,7 +480,8 @@ try {
478480
/p:Restore=$RunRestore `
479481
/p:Build=true `
480482
/clp:NoSummary `
481-
@ToolsetBuildArguments
483+
@ToolsetBuildArguments `
484+
@CommandLineArguments
482485
}
483486

484487
if (-not $OnlyBuildRepoTasks) {

eng/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ while [[ $# -gt 0 ]]; do
249249
shift
250250
done
251251

252+
commandline_args=()
253+
254+
if [ ${#msbuild_args[@]} -gt 0 ]; then
255+
commandline_args=("${msbuild_args[@]}")
256+
fi
257+
252258
if [ "$build_all" = true ]; then
253259
msbuild_args[${#msbuild_args[*]}]="-p:BuildAllProjects=true"
254260
fi
@@ -388,6 +394,10 @@ InitializeToolset
388394

389395
restore=$_tmp_restore=
390396

397+
if [ ${#commandline_args[@]} -gt 0 ]; then
398+
toolset_build_args+=("${commandline_args[@]}")
399+
fi
400+
391401
if [ "$build_repo_tasks" = true ]; then
392402
MSBuild $_InitializeToolset \
393403
-p:RepoRoot="$repo_root" \

src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
'$(PackageLicenseExpression)' " />
9696
</Target>
9797

98-
<Target Name="BeforeBuild" Condition="'$(Platform)' == 'arm64' AND '$(DotNetBuild)' != 'true'">
98+
<Target Name="BeforeBuild" Condition="'$(Platform)' == 'arm64'" >
9999
<MSBuild Projects="..\Forwarders\build.proj" />
100100
</Target>
101101
</Project>

src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/ancm_iis_expressv2.wxs

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,52 @@
265265
</Component>
266266
</Directory>
267267
</Directory>
268+
269+
<!-- WOW64 Support -->
270+
<?if $(var.Platform) != "x86" ?>
271+
<Directory Id="$(var.ProgramFilesFolder32)">
272+
<Directory Id="INSTALLDIR32" Name="IIS Express" >
273+
<Directory Id="INSTALLLOCATION32" ShortName="ANCM" Name="$(var.ProductName)">
274+
<Directory Id="VersionDir32" Name="$(var.ProductVersionString)">
275+
<!-- Originally created with same component GUID as IIS installer. Must remain the same so upgrade doesn't remove this file -->
276+
<Component Id="AspNetCoreModule.wow" Guid="45ba5011-a619-4d06-8a8d-155b1f9732b3" Win64="no">
277+
<File Id="AspNetCoreModuleDll.wow"
278+
Name="aspnetcorev2.dll"
279+
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleShim\Win32\$(var.Configuration)\aspnetcorev2.dll"
280+
DiskId="1"
281+
Vital="yes">
282+
</File>
283+
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)">
284+
<RegistryValue Name="EventMessageFile" Type="expandable" Value="[#AspNetCoreModuleDll.wow]"/>
285+
<RegistryValue Name="TypesSupported" Type="integer" Value="7"/>
286+
</RegistryKey>
287+
</Component>
288+
<Directory Id="HandlerVersionDir32" Name="$(var.ANCMFolderVersion)" >
289+
<Component Id="AspNetCoreModuleHandler.wow" Guid="0A8EDB50-7D85-4825-8010-D27EFAF061B6" Win64="no">
290+
<File Id="AspNetCoreModuleHandlerDll.wow"
291+
Name="aspnetcorev2_outofprocess.dll"
292+
Source="$(var.ArtifactsDir)\bin\OutOfProcessRequestHandler\Win32\$(var.Configuration)\aspnetcorev2_outofprocess.dll"
293+
DiskId="1"
294+
Vital="yes">
295+
</File>
296+
</Component>
297+
</Directory>
298+
</Directory>
299+
</Directory>
300+
<Directory Id="IISConfigDir.wow" Name="config">
301+
<Directory Id="IISSchemaDir.wow" Name="schema">
302+
<Component Id="AspNetCoreSchema.wow" Guid="$(var.SchemaGuid32)" Win64="no" >
303+
<File Id="AspNetCoreSchemaFile.wow"
304+
Name="aspnetcore_schema_v2.xml"
305+
Source="$(var.AspNetCoreSchemaPath)"
306+
DiskId="1"
307+
Vital="yes"/>
308+
</Component>
309+
</Directory>
310+
</Directory>
311+
</Directory>
312+
</Directory>
313+
<?endif?>
268314
</DirectoryRef>
269315

270316
<!-- Feature Definition -->
@@ -278,6 +324,11 @@
278324
<ComponentRef Id="AspNetCoreModuleHandler.arm64" />
279325
<?endif ?>
280326
<ComponentRef Id="AspNetCoreSchema"/>
327+
<?if $(var.Platform) != "x86" ?>
328+
<ComponentRef Id="AspNetCoreModule.wow"/>
329+
<ComponentRef Id="AspNetCoreModuleHandler.wow"/>
330+
<ComponentRef Id="AspNetCoreSchema.wow"/>
331+
<?endif ?>
281332
</Feature>
282333

283334
<!-- User Interface -->
@@ -637,4 +688,4 @@
637688
<Binary Id="IISCustomActionDll" SourceFile="$(var.aspnetcoreCA.TargetPath)"/>
638689
</Fragment>
639690

640-
</Wix>
691+
</Wix>

src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,27 @@
7171
</ProjectReference>
7272
</ItemGroup>
7373

74+
<ItemGroup Condition="'$(DotNetBuild)' == 'true'" >
75+
<ProjectReference Include="..\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj">
76+
<SetPlatform>Platform=x86</SetPlatform>
77+
<Name>AspNetCoreModuleV2IISExpress_x86</Name>
78+
<Private>True</Private>
79+
<DoNotHarvest>true</DoNotHarvest>
80+
</ProjectReference>
81+
<ProjectReference Include="..\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj">
82+
<SetPlatform>Platform=x64</SetPlatform>
83+
<Name>AspNetCoreModuleV2IISExpress_x64</Name>
84+
<Private>True</Private>
85+
<DoNotHarvest>true</DoNotHarvest>
86+
</ProjectReference>
87+
<ProjectReference Include="..\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj">
88+
<SetPlatform>Platform=arm64</SetPlatform>
89+
<Name>AspNetCoreModuleV2IISExpress_arm64</Name>
90+
<Private>True</Private>
91+
<DoNotHarvest>true</DoNotHarvest>
92+
</ProjectReference>
93+
</ItemGroup>
94+
7495
<Import Project="Product.targets" />
7596

7697
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

0 commit comments

Comments
 (0)