Skip to content

Commit ba90cf1

Browse files
committed
Merge branch 'main' of https://github.com/dotnet/aspnetcore into sfx-aspnetcore
2 parents 1f1faf6 + 97c6f0d commit ba90cf1

File tree

17 files changed

+161
-69
lines changed

17 files changed

+161
-69
lines changed

.github/policies/resourceManagement.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -379,17 +379,6 @@ configuration:
379379
- addMilestone:
380380
milestone: 10.0-preview1
381381
description: '[Milestone Assignments] Assign Milestone to PRs merged to the `main` branch'
382-
- if:
383-
- payloadType: Pull_Request
384-
- isAction:
385-
action: Closed
386-
- targetsBranch:
387-
branch: release/9.0-rc2
388-
then:
389-
- removeMilestone
390-
- addMilestone:
391-
milestone: 9.0-rc2
392-
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0-rc2 branch'
393382
- if:
394383
- payloadType: Pull_Request
395384
- isAction:
@@ -399,7 +388,7 @@ configuration:
399388
then:
400389
- removeMilestone
401390
- addMilestone:
402-
milestone: 9.0.0
391+
milestone: 9.0.1
403392
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0 branch'
404393
- if:
405394
- payloadType: Issues
@@ -587,7 +576,7 @@ configuration:
587576
then:
588577
- removeMilestone
589578
- addMilestone:
590-
milestone: 8.0.11
579+
milestone: 8.0.12
591580
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/8.0 branch'
592581
- if:
593582
- payloadType: Issues

Directory.Build.props

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,37 @@
242242
<ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
243243
</PropertyGroup>
244244

245+
<PropertyGroup>
246+
<OfficialBaseURL>https://dotnetcli.azureedge.net/dotnet/</OfficialBaseURL>
247+
<!-- Allow overriding the public base URL for Unified Build scenarios to pull assets from a local build. -->
248+
<PublicBaseURL Condition="'$(PublicBaseURL)' == ''">https://dotnetbuilds.azureedge.net/public/</PublicBaseURL>
249+
<InternalBaseURL>https://dotnetbuilds.azureedge.net/internal/</InternalBaseURL>
250+
<!-- Allow overriding where installers are pulled in from previously completed jobs in Unified Build scenarios. -->
251+
<CrossArchitectureInstallerBasePath Condition="'$(CrossArchitectureInstallerBasePath)' == ''">$(InstallersOutputPath)</CrossArchitectureInstallerBasePath>
252+
</PropertyGroup>
253+
254+
<!-- Try various places to find the runtime. It's either released (use official version),
255+
public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) -->
256+
<ItemGroup Condition="'$(DotNetBuild) ' != 'true'">
257+
<RemoteAssetBaseURL Include="$(OfficialBaseURL)" />
258+
<RemoteAssetBaseURL Include="$(PublicBaseURL)" />
259+
<!-- Include the token here as we'll generate the URLs to download based on this item group. -->
260+
<RemoteAssetBaseURL Include="$(InternalBaseURL)"
261+
Condition=" '$(DotnetRuntimeSourceFeedKey)' != '' ">
262+
<token>$(DotnetRuntimeSourceFeedKey)</token>
263+
</RemoteAssetBaseURL>
264+
</ItemGroup>
265+
266+
<!--
267+
Only try downloading from the "public" base URL when doing a vertical build.
268+
In a vertical build, the public URL will be overwritten to point to local build artifacts.
269+
-->
270+
<ItemGroup Condition="'$(DotNetBuild)' == 'true'">
271+
<!-- MSBuild removes the '//' slashes when passing PublicBaseURL from the outer to the inner build. -->
272+
<RemoteAssetBaseURL Condition="$(PublicBaseURL.StartsWith('file:')) and '$(OS)' != 'Windows_NT'" Include="$([System.Text.RegularExpressions.Regex]::Replace('$(PublicBaseURL)', '%28file:\/{1,}%29%28.+%29', 'file:///%242'))" />
273+
<RemoteAssetBaseURL Condition="!$(PublicBaseURL.StartsWith('file:')) or '$(OS)' == 'Windows_NT'" Include="$(PublicBaseURL)" />
274+
</ItemGroup>
275+
245276
<PropertyGroup>
246277
<!-- PackageReadmeFile specifies the package readme file name in the package. PackageReadmeFilePath points to the package readme file on disk. -->
247278
<EnableDefaultPackageReadmeFile Condition="'$(EnableDefaultPackageReadmeFile)' == '' and '$(IsShipping)' != 'false'">true</EnableDefaultPackageReadmeFile>

eng/Build.props

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@
7171
</ItemGroup>
7272
</When>
7373
<Otherwise>
74-
<ItemGroup Condition=" '$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
74+
<PropertyGroup>
75+
<_BuildWindowsInstallers Condition="'$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">true</_BuildWindowsInstallers>
76+
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x86' ">Win32</_WixTargetPlatform>
77+
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x64' ">x64</_WixTargetPlatform>
78+
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64' ">ARM64</_WixTargetPlatform>
79+
</PropertyGroup>
80+
<ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' ">
7581
<!-- Build the ANCM custom action -->
7682
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
7783
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=Win32" />
@@ -103,7 +109,26 @@
103109
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x86" />
104110
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=arm64" />
105111

106-
<!-- Windows hosting bundled -->
112+
<!-- Windows hosting bundle -->
113+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
114+
</ItemGroup>
115+
116+
<!-- In a vertical build, only build the MSIs for the current vertical in the first pass and build the hosting bundle in the second pass -->
117+
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') and '$(_BuildWindowsInstallers)' == 'true'">
118+
<!-- Build the ANCM custom action -->
119+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
120+
<!-- Build the ANCM msis -->
121+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
122+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
123+
<!-- Build the targeting pack installers -->
124+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
125+
<!-- Build the SharedFramework installers -->
126+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
127+
<!-- Build the SharedFramework wixlib -->
128+
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
129+
</ItemGroup>
130+
131+
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '2') and '$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win' and '$(TargetArchitecture)' == 'x64'">
107132
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
108133
</ItemGroup>
109134

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@
339339
<Sha>1a54480f52703fb45fac2a6b955247d33758383e</Sha>
340340
<SourceBuild RepoName="xdt" ManagedOnly="true" />
341341
</Dependency>
342-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="10.0.0-alpha.1.24530.1">
342+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="10.0.0-alpha.1.24556.1">
343343
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
344-
<Sha>136e43e45e20bd58bf86eeabba0a0fa7e1a4b3ae</Sha>
344+
<Sha>346f2ca639adb1b363592e27bf62aba52916ea3f</Sha>
345345
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
346346
</Dependency>
347347
<!-- Not updated automatically -->

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
<!-- Packages from dotnet/source-build-externals -->
174174
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>10.0.0-alpha.1.24528.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
175175
<!-- Packages from dotnet/source-build-reference-packages -->
176-
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>10.0.0-alpha.1.24530.1</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
176+
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>10.0.0-alpha.1.24556.1</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesVersion>
177177
<!-- Packages from dotnet/symreader -->
178178
<MicrosoftSourceBuildIntermediatesymreaderVersion>2.2.0-beta.24527.1</MicrosoftSourceBuildIntermediatesymreaderVersion>
179179
<!-- Packages from dotnet/xdt -->
@@ -319,8 +319,8 @@
319319
<MicrosoftPlaywrightVersion>1.45.1</MicrosoftPlaywrightVersion>
320320
<PollyExtensionsHttpVersion>3.0.0</PollyExtensionsHttpVersion>
321321
<PollyVersion>7.2.4</PollyVersion>
322-
<SeleniumSupportVersion>4.25.0</SeleniumSupportVersion>
323-
<SeleniumWebDriverVersion>4.25.0</SeleniumWebDriverVersion>
322+
<SeleniumSupportVersion>4.26.1</SeleniumSupportVersion>
323+
<SeleniumWebDriverVersion>4.26.1</SeleniumWebDriverVersion>
324324
<SerilogExtensionsLoggingVersion>1.4.0</SerilogExtensionsLoggingVersion>
325325
<SerilogSinksFileVersion>4.0.0</SerilogSinksFileVersion>
326326
<StackExchangeRedisVersion>2.7.27</StackExchangeRedisVersion>

src/Components/Components/src/Routing/Router.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static readonly IReadOnlyDictionary<string, object> _emptyParametersDictionary
9292
/// over wildcards.
9393
/// <para>This property is obsolete and configuring it does nothing.</para>
9494
/// </summary>
95-
[Obsolete("This property is obsolete and configuring it has not effect.")]
95+
[Obsolete("This property is obsolete and configuring it has no effect.")]
9696
[Parameter] public bool PreferExactMatches { get; set; }
9797

9898
private RouteTable Routes { get; set; }

src/Components/Forms/test/ReverseStringBuilderTest.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,24 @@ public void ToString_Works_AfterExceedingStackAllocatedBuffer()
9292
Assert.Equal(1, builder.SequenceSegmentCount);
9393
}
9494

95+
[Fact]
96+
public void ToString_Works_AfterExceedingStackAllocatedBuffer_WithUnusedSpaceInInitialBuffer()
97+
{
98+
const int InitialBufferSize = 64;
99+
var builder = new ReverseStringBuilder(stackalloc char[InitialBufferSize]);
100+
101+
var firstChunk = new string('A', InitialBufferSize - 10);
102+
var secondChunk = new string('B', 20);
103+
104+
builder.InsertFront(firstChunk);
105+
builder.InsertFront(secondChunk);
106+
107+
var expected = secondChunk + firstChunk;
108+
var actual = builder.ToString();
109+
110+
Assert.Equal(expected, actual);
111+
}
112+
95113
[Fact]
96114
public void ToString_Works_AfterExpandingIntoMultipleBuffersFromEstimatedStringSize()
97115
{

src/Components/Shared/src/ExpressionFormatting/ReverseStringBuilder.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal ref struct ReverseStringBuilder
1717
private SequenceSegment? _fallbackSequenceSegment;
1818

1919
// For testing.
20-
internal int SequenceSegmentCount => _fallbackSequenceSegment?.Count() ?? 0;
20+
internal readonly int SequenceSegmentCount => _fallbackSequenceSegment?.Count() ?? 0;
2121

2222
public ReverseStringBuilder(int conservativeEstimatedStringLength)
2323
{
@@ -33,7 +33,7 @@ public ReverseStringBuilder(Span<char> initialBuffer)
3333
_nextEndIndex = _currentBuffer.Length;
3434
}
3535

36-
public bool Empty => _nextEndIndex == _currentBuffer.Length;
36+
public readonly bool Empty => _nextEndIndex == _currentBuffer.Length;
3737

3838
public void InsertFront(scoped ReadOnlySpan<char> span)
3939
{
@@ -60,13 +60,13 @@ public void InsertFront(scoped ReadOnlySpan<char> span)
6060
var newBuffer = s_arrayPool.Rent(sizeToRent);
6161
_fallbackSequenceSegment = new(newBuffer);
6262

63-
_nextEndIndex = newBuffer.Length - _currentBuffer.Length;
64-
_currentBuffer.CopyTo(newBuffer.AsSpan()[_nextEndIndex..]);
65-
_currentBuffer = newBuffer;
63+
var newEndIndex = newBuffer.Length - _currentBuffer.Length + _nextEndIndex;
64+
_currentBuffer[_nextEndIndex..].CopyTo(newBuffer.AsSpan(newEndIndex));
65+
newEndIndex -= span.Length;
66+
span.CopyTo(newBuffer.AsSpan(newEndIndex));
6667

67-
startIndex = _nextEndIndex - span.Length;
68-
span.CopyTo(_currentBuffer[startIndex..]);
69-
_nextEndIndex = startIndex;
68+
_currentBuffer = newBuffer;
69+
_nextEndIndex = newEndIndex;
7070
}
7171
else
7272
{

src/Framework/App.Runtime/src/aspnetcore-runtime-composite.proj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,8 @@
3232
</PropertyGroup>
3333

3434
<Target Name="_DownloadAndExtractDotNetRuntime" Condition="'$(DotNetBuild)' != 'true'" Returns="$(DotNetRuntimeArchive)">
35-
<!-- Try various places to find the runtime. It's either released (use official version),
36-
public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) -->
3735
<ItemGroup>
38-
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/$(DotNetRuntimeDownloadPath)" />
39-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(DotNetRuntimeDownloadPath)" />
40-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(DotNetRuntimeDownloadPath)"
41-
Condition=" '$(DotnetRuntimeSourceFeedKey)' != '' ">
42-
<token>$(DotnetRuntimeSourceFeedKey)</token>
43-
</UrisToDownload>
36+
<UrisToDownload Include="@(RemoteAssetBaseURL->'%(Identity)$(DotNetRuntimeDownloadPath)')" />
4437
</ItemGroup>
4538

4639
<DownloadFile Condition=" !Exists('$(DotNetRuntimeArchive)') "

src/Framework/App.Runtime/src/aspnetcore-runtime.proj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,8 @@
3535
</PropertyGroup>
3636

3737
<Target Name="_DownloadAndExtractDotNetRuntime" Condition="'$(DotNetBuild)' != 'true'" Returns="$(DotNetRuntimeArchive)">
38-
<!-- Try various places to find the runtime. It's either released (use official version),
39-
public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) -->
4038
<ItemGroup>
41-
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/$(DotNetRuntimeDownloadPath)" />
42-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(DotNetRuntimeDownloadPath)" />
43-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(DotNetRuntimeDownloadPath)"
44-
Condition=" '$(DotnetRuntimeSourceFeedKey)' != '' ">
45-
<token>$(DotnetRuntimeSourceFeedKey)</token>
46-
</UrisToDownload>
39+
<UrisToDownload Include="@(RemoteAssetBaseURL->'%(Identity)$(DotNetRuntimeDownloadPath)')" />
4740
</ItemGroup>
4841

4942
<DownloadFile Condition=" !Exists('$(DotNetRuntimeArchive)') "

0 commit comments

Comments
 (0)