Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<PropertyGroup>
<ExternalCertificateId Condition="'$(ExternalCertificateId)' == ''">3PartySHA2</ExternalCertificateId>
<InternalCertificateId Condition="'$(InternalCertificateId)' == ''">MicrosoftDotNet500</InternalCertificateId>
<UseDotNetCertificate>true</UseDotNetCertificate>
</PropertyGroup>

Expand Down Expand Up @@ -46,10 +45,6 @@
<FileExtensionSignInfo Include=".js" CertificateName="None" />
</ItemGroup>

<ItemGroup>
<FileExtensionSignInfo Include=".msi" CertificateName="$(InternalCertificateId)" />
</ItemGroup>

<!--
These are third party libraries that we use in Arcade. We need to sign them even if they
are already signed. However, they must be signed with a 3rd party certificate.
Expand Down
28 changes: 14 additions & 14 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -640,34 +640,34 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SignTool" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.DotNet.SignTool" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="10.0.0-beta.25164.6">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="10.0.0-beta.25174.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1912d9f4fc410d421a01b5a09131aae234b603fa</Sha>
<Sha>cf68aacc3f678dd705b8aa986f1adc38cd82fc6e</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="System.Reflection.MetadataLoadContext" Version="10.0.0-preview.4.25173.3">
Expand Down
8 changes: 4 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>10.0.0-beta.25164.6</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetSignToolVersion>10.0.0-beta.25164.6</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetXliffTasksVersion>10.0.0-beta.25164.6</MicrosoftDotNetXliffTasksVersion>
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.25164.6</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>10.0.0-beta.25174.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetSignToolVersion>10.0.0-beta.25174.1</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetXliffTasksVersion>10.0.0-beta.25174.1</MicrosoftDotNetXliffTasksVersion>
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.25174.1</MicrosoftDotNetXUnitExtensionsVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/sourcelink -->
Expand Down
2 changes: 1 addition & 1 deletion eng/common/CIBuild.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
7 changes: 6 additions & 1 deletion eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Param(
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
[bool] $nodeReuse = $true,
[switch] $buildCheck = $false,
[switch][Alias('r')]$restore,
[switch] $deployDeps,
[switch][Alias('b')]$build,
Expand Down Expand Up @@ -71,6 +72,8 @@ function Print-Usage() {
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host " -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
Write-Host " -buildCheck Sets /check msbuild parameter"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand All @@ -97,6 +100,7 @@ function Build {

$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
$check = if ($buildCheck) { '/check' } else { '' }

if ($projects) {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
Expand All @@ -113,6 +117,7 @@ function Build {
MSBuild $toolsetBuildProj `
$bl `
$platformArg `
$check `
/p:Configuration=$configuration `
/p:RepoRoot=$RepoRoot `
/p:Restore=$restore `
Expand Down Expand Up @@ -166,4 +171,4 @@ catch {
ExitWithExitCode 1
}

ExitWithExitCode 0
ExitWithExitCode 0
13 changes: 12 additions & 1 deletion eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ usage()
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo ""
echo "Command line arguments not listed above are passed thru to msbuild."
echo "Arguments can also be passed in with a single hyphen."
Expand Down Expand Up @@ -76,6 +77,7 @@ clean=false

warn_as_error=true
node_reuse=true
build_check=false
binary_log=false
exclude_ci_binary_log=false
pipelines_log=false
Expand Down Expand Up @@ -173,6 +175,9 @@ while [[ $# > 0 ]]; do
node_reuse=$2
shift
;;
-buildcheck)
build_check=true
;;
-runtimesourcefeed)
runtime_source_feed=$2
shift
Expand Down Expand Up @@ -224,8 +229,14 @@ function Build {
bl="/bl:\"$log_dir/Build.binlog\""
fi

local check=""
if [[ "$build_check" == true ]]; then
check="/check"
fi

MSBuild $_InitializeToolset \
$bl \
$check \
/p:Configuration=$configuration \
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
Expand Down Expand Up @@ -256,4 +267,4 @@ if [[ "$restore" == true ]]; then
InitializeNativeTools
fi

Build
Build
2 changes: 1 addition & 1 deletion eng/common/cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ while [[ -h $source ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
30 changes: 28 additions & 2 deletions eng/common/core-templates/steps/install-microbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
# Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'
enableMicrobuildForMacAndLinux: false
# Location of the MicroBuild output folder
microBuildOutputFolder: '$(Agent.TempDirectory)'
microBuildOutputFolder: '$(Build.SourcesDirectory)'
continueOnError: false

steps:
Expand Down Expand Up @@ -41,7 +41,7 @@ steps:
inputs:
packageType: sdk
version: 8.0.x
installationPath: ${{ parameters.microBuildOutputFolder }}/dotnet
installationPath: ${{ parameters.microBuildOutputFolder }}/.dotnet
workingDirectory: ${{ parameters.microBuildOutputFolder }}
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))

Expand All @@ -53,6 +53,7 @@ steps:
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
${{ if and(eq(parameters.enableMicrobuildForMacAndLinux, 'true'), ne(variables['Agent.Os'], 'Windows_NT')) }}:
azureSubscription: 'MicroBuild Signing Task (DevDiv)'
useEsrpCli: true
env:
TeamName: $(_TeamName)
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
Expand All @@ -71,3 +72,28 @@ steps:
eq(variables['_SignType'], 'real')
)
))

# Workaround for ESRP CLI on Linux - https://github.com/dotnet/source-build/issues/4964
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:
- task: UseDotNet@2
displayName: Install .NET 9.0 SDK for ESRP CLI Workaround
inputs:
packageType: sdk
version: 9.0.x
installationPath: ${{ parameters.microBuildOutputFolder }}/.dotnet
workingDirectory: ${{ parameters.microBuildOutputFolder }}
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))

- task: PowerShell@2
displayName: Workaround for ESRP CLI on Linux
inputs:
targetType: 'inline'
script: |
Write-Host "Copying Linux Path"
$MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER -replace '/build', ''
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER + '/1.1.1032' + '/build'
$MBSIGN_APPFOLDER | Write-Host
$SignConfigPath = $MBSIGN_APPFOLDER + '/signconfig.xml'
Copy-Item -Path "$(MBSIGN_APPFOLDER)/signconfig.xml" -Destination $SignConfigPath -Force
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "10.0.100-preview.3.25125.5",
"dotnet": "10.0.100-preview.3.25167.3",
"runtimes": {
"dotnet": [
"$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)"
Expand All @@ -14,8 +14,8 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25164.6",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25164.6",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25174.1",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25174.1",
"Microsoft.Build.NoTargets": "3.7.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ protected override string GetSkipReason(IAttributeInfo factAttribute)

public override void Deserialize(IXunitSerializationInfo data)
{
base.Deserialize(data);
_skipReason = data.GetValue<string>(nameof(_skipReason));

// we need to call base after reading our value, because Deserialize will call
// into GetSkipReason.
base.Deserialize(data);
}

public override void Serialize(IXunitSerializationInfo data)
Expand Down
25 changes: 25 additions & 0 deletions src/SourceBuild/patches/aspire/0001-Only-add-msi-in-Signing.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 19613e59556056f1f2c7326e48210991b58061e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= <alex.koeplinger@outlook.com>
Date: Mon, 24 Mar 2025 17:12:26 +0100
Subject: [PATCH] Only add .msi in Signing.props when missing

Backport: https://github.com/dotnet/aspire/pull/8272
---
eng/Signing.props | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eng/Signing.props b/eng/Signing.props
index 3b4b6c2ee4..1d50eda172 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -3,7 +3,9 @@
<ItemGroup>
<FileExtensionSignInfo Update=".nupkg" CertificateName="NuGet" />
<FileExtensionSignInfo Update=".zip" CertificateName="None" />
- <FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" />
+
+ <!-- add missing entry for .msi, this can be removed once aspire uses arcade 10.0 -->
+ <FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" Condition="!@(FileExtensionSignInfo->AnyHaveMetadataValue('Identity', '.msi'))" />
</ItemGroup>

<ItemGroup>
24 changes: 24 additions & 0 deletions src/SourceBuild/patches/aspnetcore/0001-Remove-duplicate-msi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 856dfcd581ec40e6e2ea3971a922c33f28797ab3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= <alex.koeplinger@outlook.com>
Date: Mon, 24 Mar 2025 17:20:27 +0100
Subject: [PATCH] Remove duplicate .msi FileExtensionSignInfo

Backport: https://github.com/dotnet/aspnetcore/pull/61125
---
eng/Signing.props | 3 ---
1 file changed, 3 deletions(-)

diff --git a/eng/Signing.props b/eng/Signing.props
index 5d4786646198..9b981c9c8abc 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -8,9 +8,6 @@
</PropertyGroup>

<ItemGroup Label="File signing information">
- <!-- Arcade does not set a default for .msi's -->
- <FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" />
-
<!-- Third-party components which should be signed. -->
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="AngleSharp.dll" CertificateName="3PartySHA2" />
Loading
Loading