Skip to content

Commit 4081060

Browse files
dotnet-maestro[bot]jkoritzinskyBrennanConroymarafwtgodbe
authored
[main] Source code updates from dotnet/dotnet (#63243)
* Backflow from https://github.com/dotnet/dotnet / adfea8e build 279079 [[ commit created by automation ]] * Update dependencies from https://github.com/dotnet/dotnet build 279079 Updated Dependencies: Microsoft.NET.Runtime.WebAssembly.Sdk, Microsoft.NETCore.BrowserDebugHost.Transport, Microsoft.NET.Runtime.MonoAOTCompiler.Task, Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.TimeProvider, Microsoft.Extensions.Caching.Abstractions, Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.Abstractions, Microsoft.Extensions.Configuration.Binder, Microsoft.Extensions.Configuration.CommandLine, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.FileExtensions, Microsoft.Extensions.Configuration.Ini, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Configuration.UserSecrets, Microsoft.Extensions.Configuration.Xml, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyInjection.Abstractions, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.Diagnostics, Microsoft.Extensions.Diagnostics.Abstractions, Microsoft.Extensions.FileProviders.Abstractions, Microsoft.Extensions.FileProviders.Composite, Microsoft.Extensions.FileProviders.Physical, Microsoft.Extensions.FileSystemGlobbing, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Hosting, Microsoft.Extensions.Hosting.Abstractions, Microsoft.Extensions.Http, Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Abstractions, Microsoft.Extensions.Logging.Configuration, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Logging.Debug, Microsoft.Extensions.Logging.EventLog, Microsoft.Extensions.Logging.EventSource, Microsoft.Extensions.Logging.TraceSource, Microsoft.Extensions.Options, Microsoft.Extensions.Options.ConfigurationExtensions, Microsoft.Extensions.Options.DataAnnotations, Microsoft.Extensions.Primitives, Microsoft.Internal.Runtime.AspNetCore.Transport, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Collections.Immutable, System.Composition, System.Configuration.ConfigurationManager, System.Diagnostics.DiagnosticSource, System.Diagnostics.EventLog, System.Diagnostics.PerformanceCounter, System.DirectoryServices.Protocols, System.Formats.Asn1, System.Formats.Cbor, System.IO.Hashing, System.IO.Pipelines, System.Memory.Data, System.Net.Http.Json, System.Net.Http.WinHttpHandler, System.Net.ServerSentEvents, System.Numerics.Tensors, System.Reflection.Metadata, System.Resources.Extensions, System.Runtime.Caching, System.Security.Cryptography.Pkcs, System.Security.Cryptography.Xml, System.Security.Permissions, System.ServiceProcess.ServiceController, System.Text.Encodings.Web, System.Text.Json, System.Threading.AccessControl, System.Threading.Channels, System.Threading.RateLimiting (Version 10.0.0-preview.7.25377.103 -> 10.0.0-rc.1.25413.101) dotnet-ef, Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.InMemory, Microsoft.EntityFrameworkCore.Relational, Microsoft.EntityFrameworkCore.Sqlite, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools (Version 10.0.0-rc.1.25377.103 -> 10.0.0-rc.1.25413.101) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk (Version 10.0.0-beta.25377.103 -> 10.0.0-beta.25413.101) Microsoft.Web.Xdt (Version 3.2.0-preview.25377.103 -> 3.2.0-preview.25413.101) NuGet.Frameworks, NuGet.Packaging, NuGet.Versioning (Version 6.2.4 -> 7.0.0-preview.1.41901) * Update KnownILLinkPack/KnownILCompilerPack instead of using a PackageReference to Microsoft.DotNet.ILCompiler. This uses the same mechanism that the repo already uses for updating the apphost/ref/runtime packs as well as the crossgen2 pack * Apply suggestions from code review * Add base href for GlobalizationWasmApp * Disable HotReload in WasmMinimal * Disable HotReload in CustomBasePathApp and HostedInAspNet.Client Tests that host multiple apps doesn't resolve JS initializers correctly * Update eng/tools/GenerateFiles/Directory.Build.targets.in --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Jeremy Koritzinsky <[email protected]> Co-authored-by: Brennan <[email protected]> Co-authored-by: Marek Fišera <[email protected]> Co-authored-by: William Godbe <[email protected]>
1 parent ab9e263 commit 4081060

File tree

17 files changed

+362
-327
lines changed

17 files changed

+362
-327
lines changed

eng/Version.Details.props

Lines changed: 95 additions & 97 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 188 additions & 188 deletions
Large diffs are not rendered by default.

eng/common/core-templates/job/onelocbuild.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ parameters:
44

55
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
66
pool: ''
7-
7+
88
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
99
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
1010

@@ -27,7 +27,7 @@ parameters:
2727
is1ESPipeline: ''
2828
jobs:
2929
- job: OneLocBuild${{ parameters.JobNameSuffix }}
30-
30+
3131
dependsOn: ${{ parameters.dependsOn }}
3232

3333
displayName: OneLocBuild${{ parameters.JobNameSuffix }}
@@ -99,22 +99,20 @@ jobs:
9999
mirrorBranch: ${{ parameters.MirrorBranch }}
100100
condition: ${{ parameters.condition }}
101101

102-
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
103-
parameters:
104-
is1ESPipeline: ${{ parameters.is1ESPipeline }}
105-
args:
106-
displayName: Publish Localization Files
107-
pathToPublish: '$(Build.ArtifactStagingDirectory)/loc'
108-
publishLocation: Container
109-
artifactName: Loc
110-
condition: ${{ parameters.condition }}
102+
# Copy the locProject.json to the root of the Loc directory, then publish a pipeline artifact
103+
- task: CopyFiles@2
104+
displayName: Copy LocProject.json
105+
inputs:
106+
SourceFolder: '$(Build.SourcesDirectory)/eng/Localize/'
107+
Contents: 'LocProject.json'
108+
TargetFolder: '$(Build.ArtifactStagingDirectory)/loc'
109+
condition: ${{ parameters.condition }}
111110

112-
- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
111+
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
113112
parameters:
114113
is1ESPipeline: ${{ parameters.is1ESPipeline }}
115114
args:
116-
displayName: Publish LocProject.json
117-
pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/'
118-
publishLocation: Container
119-
artifactName: Loc
115+
targetPath: '$(Build.ArtifactStagingDirectory)/loc'
116+
artifactName: 'Loc'
117+
displayName: 'Publish Localization Files'
120118
condition: ${{ parameters.condition }}

eng/common/tools.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,20 @@ function Retry($downloadBlock, $maxRetries = 5) {
257257

258258
function GetDotNetInstallScript([string] $dotnetRoot) {
259259
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
260+
$shouldDownload = $false
261+
260262
if (!(Test-Path $installScript)) {
263+
$shouldDownload = $true
264+
} else {
265+
# Check if the script is older than 30 days
266+
$fileAge = (Get-Date) - (Get-Item $installScript).LastWriteTime
267+
if ($fileAge.Days -gt 30) {
268+
Write-Host "Existing install script is too old, re-downloading..."
269+
$shouldDownload = $true
270+
}
271+
}
272+
273+
if ($shouldDownload) {
261274
Create-Directory $dotnetRoot
262275
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
263276
$uri = "https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"

eng/common/tools.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,29 @@ function GetDotNetInstallScript {
300300
local root=$1
301301
local install_script="$root/dotnet-install.sh"
302302
local install_script_url="https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
303+
local timestamp_file="$root/.dotnet-install.timestamp"
304+
local should_download=false
303305

304306
if [[ ! -a "$install_script" ]]; then
307+
should_download=true
308+
elif [[ -f "$timestamp_file" ]]; then
309+
# Check if the script is older than 30 days using timestamp file
310+
local download_time=$(cat "$timestamp_file" 2>/dev/null || echo "0")
311+
local current_time=$(date +%s)
312+
local age_seconds=$((current_time - download_time))
313+
314+
# 30 days = 30 * 24 * 60 * 60 = 2592000 seconds
315+
if [[ $age_seconds -gt 2592000 ]]; then
316+
echo "Existing install script is too old, re-downloading..."
317+
should_download=true
318+
fi
319+
else
320+
# No timestamp file exists, assume script is old and re-download
321+
echo "No timestamp found for existing install script, re-downloading..."
322+
should_download=true
323+
fi
324+
325+
if [[ "$should_download" == true ]]; then
305326
mkdir -p "$root"
306327

307328
echo "Downloading '$install_script_url'"
@@ -328,6 +349,9 @@ function GetDotNetInstallScript {
328349
ExitWithExitCode $exit_code
329350
}
330351
fi
352+
353+
# Create timestamp file to track download time in seconds from epoch
354+
date +%s > "$timestamp_file"
331355
fi
332356
# return value
333357
_GetDotNetInstallScript="$install_script"

eng/targets/CSharp.Common.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@
9494
<_Parameter2>$(RepositoryUrl)/tree/$(SourceRevisionId)</_Parameter2>
9595
</AssemblyAttribute>
9696

97-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
97+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(RepoOriginalSourceRevisionId)' != ''">
98+
<_Parameter1>OriginalRepoCommitHash</_Parameter1>
99+
<_Parameter2>$(RepoOriginalSourceRevisionId)</_Parameter2>
100+
</AssemblyAttribute>
101+
102+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
98103
<_Parameter1>Serviceable</_Parameter1>
99104
<_Parameter2>True</_Parameter2>
100105
</AssemblyAttribute>

eng/targets/Wix.Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<!-- Everything built in those projects _except_ the final package & MSI are shipping assets. -->
2323
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
2424
<_GeneratedPackageVersion
25-
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
25+
Condition="! $(PackageVersion.Contains('$(_BuildNumberLabels)'))">$(VersionPrefix)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
2626
<!-- Insert PackageVersion into OutputName for SharedFx & TargetingPack -->
2727
<OutputName Condition="'$(OutputNamePrefix)' != '' AND '$(OutputNameSuffix)' != ''">$(OutputNamePrefix)$(_GeneratedPackageVersion)$(OutputNameSuffix)</OutputName>
2828

eng/testing/linker/SupportFiles/Directory.Build.targets

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
<Project>
2-
3-
<PropertyGroup>
4-
<!-- Used to silence the warning caused by the workaround for https://github.com/dotnet/runtime/issues/81382 -->
5-
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
6-
</PropertyGroup>
7-
8-
<!-- needed to reference a specific version of NetCoreApp. Workaround https://github.com/dotnet/runtime/issues/81382 -->
92
<ItemGroup>
103
<FrameworkReference Update="Microsoft.NETCore.App"
114
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)" />
125

13-
<PackageReference Include="Microsoft.DotNet.ILCompiler"
14-
Version="$(MicrosoftNETCoreAppRefVersion)" />
15-
166
<!-- Workaround when there is no vNext SDK available; copy known packs info from 9.0. -->
177
<KnownAppHostPack Include="@(KnownAppHostPack->WithMetadataValue('TargetFramework', 'net9.0'))"
188
TargetFramework="$(TargetFramework)"
@@ -64,6 +54,13 @@
6454
<AppHostRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</AppHostRuntimeIdentifiers>
6555
</KnownRuntimePack>
6656

57+
<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler">
58+
<ILCompilerPackVersion>$(MicrosoftNETCoreAppRefVersion)</ILCompilerPackVersion>
59+
</KnownILCompilerPack>
60+
61+
<KnownILLinkPack Update="Microsoft.NET.ILLink.Tasks">
62+
<ILLinkPackVersion>$(MicrosoftNETCoreAppRefVersion)</ILLinkPackVersion>
63+
</KnownILLinkPack>
6764
</ItemGroup>
6865

6966
<!--

eng/tools/GenerateFiles/Directory.Build.props.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44
<ArtifactsShippingPackagesDir>${ArtifactsShippingPackagesDir}</ArtifactsShippingPackagesDir>
55
<TreatWarningsAsErrors Condition="'$(BuildingInsideVisualStudio)' != 'true'">true</TreatWarningsAsErrors>
66
<LibNetHostAppPackVersion Condition=" '$(LibNetHostAppPackVersion)' == '' ">${LibNetHostAppPackVersion}</LibNetHostAppPackVersion>
7-
8-
<!-- Temporarily hardcoded to true -->
9-
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
107
</PropertyGroup>
118
</Project>

eng/tools/GenerateFiles/Directory.Build.targets.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '${DefaultNetCoreTargetFramework}') AND '${DefaultNetCoreTargetFramework}' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
5757
RuntimeFrameworkVersion="${MicrosoftNETCoreAppRefVersion}"
5858
TargetingPackVersion="${MicrosoftNETCoreAppRefVersion}" />
59-
60-
<PackageReference Include="Microsoft.DotNet.ILCompiler"
61-
Condition=" '$(PublishAot)' == 'true' "
62-
Version="${MicrosoftNETCoreAppRefVersion}" />
6359
</ItemGroup>
6460

6561
<ItemGroup>
@@ -118,6 +114,11 @@
118114
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</ILLinkPackVersion>
119115
</KnownILLinkPack>
120116

117+
<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler">
118+
<ILCompilerPackVersion
119+
Condition="'%(TargetFramework)' == '${DefaultNetCoreTargetFramework}'">${MicrosoftNETCoreAppRefVersion}</ILCompilerPackVersion>
120+
</KnownILCompilerPack>
121+
121122
<!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. -->
122123
<KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) ">
123124
<LatestRuntimeFrameworkVersion

0 commit comments

Comments
 (0)