Skip to content

Commit c422c7e

Browse files
authored
Merge branch 'master' into merge/release/3.1-to-master
2 parents dfc7dcd + 9a1810c commit c422c7e

File tree

365 files changed

+4339
-1674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+4339
-1674
lines changed

.azure/pipelines/ci.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ stages:
136136
-pack
137137
-noBuildDeps
138138
$(_BuildArgs)
139+
condition: ne(variables['Build.Reason'], 'PullRequest')
139140
displayName: Build SiteExtension
140141

141142
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
@@ -453,7 +454,7 @@ stages:
453454
- name: Windows_Test_Dumps
454455
path: artifacts/dumps/
455456
publishOnError: true
456-
includeForks: false
457+
includeForks: true
457458
- name: Windows_Test_Logs
458459
path: artifacts/log/
459460
publishOnError: true
@@ -481,7 +482,7 @@ stages:
481482
- name: Windows_Test_Templates_Dumps
482483
path: artifacts/dumps/
483484
publishOnError: true
484-
includeForks: false
485+
includeForks: true
485486
- name: Windows_Test_Templates_Logs
486487
path: artifacts/log/
487488
publishOnError: true
@@ -563,6 +564,27 @@ stages:
563564
publishOnError: true
564565
includeForks: true
565566

567+
# Helix ARM64
568+
- template: jobs/default-build.yml
569+
parameters:
570+
jobName: Helix_arm64
571+
jobDisplayName: "Tests: Helix ARM64"
572+
agentOs: Linux
573+
timeoutInMinutes: 240
574+
steps:
575+
- script: ./restore.sh -ci
576+
displayName: Restore
577+
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
578+
displayName: Run build.sh helix arm64 target
579+
env:
580+
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
581+
installNodeJs: false
582+
artifacts:
583+
- name: Helix_arm64_logs
584+
path: artifacts/log/
585+
publishOnError: true
586+
includeForks: true
587+
566588
# Source build
567589
- job: Source_Build
568590
displayName: 'Test: Linux Source Build'

.azure/pipelines/helix-test.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,3 @@ jobs:
2525
- name: Helix_logs
2626
path: artifacts/log/
2727
publishOnError: true
28-
29-
# Build Helix ARM64
30-
- template: jobs/default-build.yml
31-
parameters:
32-
jobName: Helix_arm64
33-
jobDisplayName: "Tests: Helix ARM64"
34-
agentOs: Linux
35-
timeoutInMinutes: 240
36-
steps:
37-
- script: ./restore.sh -ci
38-
displayName: Restore
39-
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
40-
displayName: Run build.sh helix arm64 target
41-
env:
42-
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
43-
installNodeJs: false
44-
artifacts:
45-
- name: Helix_arm64_logs
46-
path: artifacts/logs/
47-
publishOnError: true

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/src/Hosting/ @tratcher @anurse
1515
/src/Http/ @tratcher @jkotalik @anurse
1616
/src/Middleware/ @tratcher @anurse
17-
/src/ProjectTemplates/ @ryanbrandenburg
17+
# /src/ProjectTemplates/ @ryanbrandenburg
1818
/src/Security/ @tratcher @anurse
1919
/src/Servers/ @tratcher @jkotalik @anurse @halter73
2020
/src/Middleware/Rewrite @jkotalik @anurse

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
<IncludeSymbols>true</IncludeSymbols>
5454

55-
<DefaultNetCoreTargetFramework>netcoreapp3.1</DefaultNetCoreTargetFramework>
55+
<DefaultNetCoreTargetFramework>netcoreapp5.0</DefaultNetCoreTargetFramework>
5656
</PropertyGroup>
5757

5858
<!-- Warnings and errors -->

eng/Version.Details.xml

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

eng/Versions.props

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

eng/Workarounds.targets

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<!-- Use this file to workaround issues. List the issue tracking the item to fix so we can remove the workaround when the issue is resolved. -->
22
<Project>
3-
<!-- Workaround while there is no 3.1 SDK available, suppress unsupported version error -->
3+
<!-- Workaround while there is no 5.0 SDK available, suppress unsupported version error -->
44
<PropertyGroup>
5-
<NETCoreAppMaximumVersion>3.1</NETCoreAppMaximumVersion>
5+
<NETCoreAppMaximumVersion>5.0</NETCoreAppMaximumVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<!-- Reference base shared framework at incoming dependency flow version, not bundled sdk version. -->
1010
<FrameworkReference
1111
Update="Microsoft.NETCore.App"
12-
Condition="'$(TargetFramework)' == 'netcoreapp3.1'"
12+
Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"
1313
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
1414
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
1515
/>
@@ -25,11 +25,6 @@
2525
<Reference Include="Microsoft.AspNetCore.Mvc" Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(GenerateRazorAssemblyInfo)' == 'true'" />
2626
</ItemGroup>
2727

28-
<!-- Workaround https://github.com/dotnet/cli/issues/10528 -->
29-
<PropertyGroup>
30-
<BundledNETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
31-
</PropertyGroup>
32-
3328
<!-- Workaround https://github.com/aspnet/AspNetCore/issues/7503. This chains GenerateSourceLinkFile before razor component targets run. -->
3429
<!-- Workaround https://github.com/dotnet/source-build/issues/1112. Source link is currently disabled in source build so do not apply this worksaround. -->
3530
<Target Condition="'$(DotNetBuildFromSource)' != 'true'"

eng/helix/content/InstallNode.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ Write-Host "Extracting to $tempDir"
4848

4949
if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) {
5050
# Use built-in commands where possible as they are cross-plat compatible
51-
Microsoft.PowerShell.Archive\Expand-Archive -Path "nodejs.zip" -DestinationPath $tempDir
51+
Microsoft.PowerShell.Archive\Expand-Archive -Path "nodejs.zip" -DestinationPath $tempDir -Force
5252
}
5353
else {
54+
Remove-Item $tempDir -Recurse -ErrorAction Ignore
5455
# Fallback to old approach for old installations of PowerShell
5556
Add-Type -AssemblyName System.IO.Compression.FileSystem
5657
[System.IO.Compression.ZipFile]::ExtractToDirectory("nodejs.zip", $tempDir)

eng/scripts/CodeCheck.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,17 @@ try {
169169
Write-Host "Run git diff to check for pending changes"
170170

171171
# Redirect stderr to stdout because PowerShell does not consistently handle output to stderr
172-
$changedFiles = & cmd /c 'git --no-pager diff --ignore-space-at-eol --name-only 2>nul'
172+
$changedFiles = & cmd /c 'git --no-pager diff --ignore-space-change --name-only 2>nul'
173173

174174
# Temporary: Disable check for blazor js file
175175
$changedFilesExclusion = "src/Components/Web.JS/dist/Release/blazor.server.js"
176176

177177
if ($changedFiles) {
178178
foreach ($file in $changedFiles) {
179179
if ($file -eq $changedFilesExclusion) {continue}
180-
181180
$filePath = Resolve-Path "${repoRoot}/${file}"
182181
LogError "Generated code is not up to date in $file. You might need to regenerate the reference assemblies or project list (see docs/ReferenceAssemblies.md and docs/ReferenceResolution.md)" -filepath $filePath
183-
& git --no-pager diff --ignore-space-at-eol $filePath
182+
& git --no-pager diff --ignore-space-change $filePath
184183
}
185184
}
186185
}

eng/targets/Helix.Common.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" />
1919
<HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" />
2020
<HelixAvailableTargetQueue Include="Windows.10.Amd64.EnterpriseRS3.ASPNET.Open" Platform="Windows" EnableByDefault="false" />
21-
<HelixAvailableTargetQueue Include="OSX.1013.Amd64.Open" Platform="OSX" />
2221
<HelixAvailableTargetQueue Include="Ubuntu.1604.Amd64.Open" Platform="Linux" />
2322
<HelixAvailableTargetQueue Include="Ubuntu.1804.Amd64.Open" Platform="Linux" />
2423
<HelixAvailableTargetQueue Include="Centos.7.Amd64.Open" Platform="Linux" />

eng/targets/Npm.Common.targets

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,20 @@
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<TSFiles Include="$(MSBuildProjectDirectory)\*\*.ts" />
24-
<TSFiles Include="$(MSBuildProjectDirectory)\package.json" />
25-
<TSFiles Include="$(MSBuildProjectDirectory)\*.npmproj" />
23+
<TSFiles Include="src\**\*.ts" />
24+
<TSFiles Include="test\**\*.ts" />
25+
<TSFiles Include="package.json" />
26+
<TSFiles Include="*.npmproj" />
27+
28+
<BuildOutputFiles Include="$(BaseIntermediateOutputPath)\build-sentinel" />
29+
<BuildOutputFiles Include="dist\**\*.js" />
2630
</ItemGroup>
2731

2832
<Target Name="_CheckForInvalidConfiguration">
2933
<Error Text="Missing expected property: PackageId" Condition="'$(IsPackable)' != 'false' and '$(PackageId)' == ''" />
3034

31-
<Exec ContinueOnError="true" Command="node -v">
32-
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
35+
<Exec ContinueOnError="true" Command="node -v" StandardOutputImportance="Low">
36+
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
3337
</Exec>
3438

3539
<Error Text="Building *.npmproj but NodeJS was not detected on path. Ensure NodeJS is on path or disable building NodeJS projects with /p:BuildNodeJs=false. Skipping NodeJS projects will also skip managed projects depending on them, including Components, Mvc and Analysers." Condition="'$(ErrorCode)' != '0'"/>
@@ -53,12 +57,25 @@
5357
<CallTarget Targets="_Pack" Condition="'$(PackOnBuild)' == 'true'" />
5458
</Target>
5559

60+
<Target Name="GetBuildInputCacheFile">
61+
<Hash ItemsToHash="@(TSFiles)">
62+
<Output TaskParameter="HashResult" PropertyName="_TSFileHash" />
63+
</Hash>
64+
65+
<WriteLinesToFile
66+
Lines="$(_TSFileHash)"
67+
File="$(BaseIntermediateOutputPath)tsfiles.cache"
68+
Overwrite="True"
69+
WriteOnlyWhenDifferent="True" />
70+
</Target>
71+
5672
<Target Name="_Build"
5773
Condition="'$(IsBuildable)' != 'false'"
58-
Inputs="@(TSFiles)"
59-
Outputs="$(BaseIntermediateOutputPath)\build-sentinel" >
74+
DependsOnTargets="GetBuildInputCacheFile"
75+
Inputs="@(TSFiles);$(BaseIntermediateOutputPath)tsfiles.cache"
76+
Outputs="@(BuildOutputFiles)">
6077
<Yarn Command="$(NpmBuildArgs)" StandardOutputImportance="High" StandardErrorImportance="High" />
61-
<WriteLinesToFile Overwrite="true" File="$(BaseIntermediateOutputPath)\build-sentinel" />
78+
<WriteLinesToFile Overwrite="true" File="$(BaseIntermediateOutputPath)build-sentinel" />
6279
</Target>
6380

6481
<PropertyGroup>
@@ -73,7 +90,10 @@
7390
</PackDependsOn>
7491
</PropertyGroup>
7592

76-
<Target Name="_Pack" Condition="'$(IsPackable)' == 'true'" >
93+
<Target Name="_Pack" Condition="'$(IsPackable)' == 'true'"
94+
Inputs="@(TSFiles)"
95+
Outputs="$(PackageOutputPath)\$(PackageFileName)">
96+
7797
<PropertyGroup>
7898
<_PackageTargetPath>$(MSBuildProjectDirectory)\$(PackageFileName)</_PackageTargetPath>
7999
</PropertyGroup>

eng/tools/BaselineGenerator/BaselineGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
66
<StartArguments>-s https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</StartArguments>
77
<StartWorkingDirectory>$(MSBuildThisFileDirectory)../../</StartWorkingDirectory>
88
</PropertyGroup>

eng/tools/RepoTasks/RepoTasks.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
55
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net472</TargetFrameworks>
66
<DefineConstants Condition="'$(TargetFramework)' == 'net472'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
77
<Optimize>false</Optimize>
@@ -16,7 +16,7 @@
1616
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
1717
</ItemGroup>
1818

19-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
19+
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
2020
<PackageReference Include="Microsoft.Build.Framework" Version="15.8.166" />
2121
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.8.166" />
2222
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.8.166" />

eng/tools/RepoTasks/RepoTasks.tasks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp3.1</_RepoTaskAssemblyFolder>
3+
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp5.0</_RepoTaskAssemblyFolder>
44
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_RepoTaskAssemblyFolder>
55
<_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll</_RepoTaskAssembly>
66
</PropertyGroup>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "3.1.100-preview1-014024"
3+
"version": "5.0.100-alpha1-013788"
44
},
55
"tools": {
6-
"dotnet": "3.1.100-preview1-014024",
6+
"dotnet": "5.0.100-alpha1-013788",
77
"runtimes": {
88
"dotnet/x64": [
99
"$(MicrosoftNETCoreAppRuntimeVersion)"

src/Components/Analyzers/test/ComponentInternalUsageDiagnoticsAnalyzerTest.cs renamed to src/Components/Analyzers/test/ComponentInternalUsageDiagnosticsAnalyzerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
namespace Microsoft.AspNetCore.Components.Analyzers
1010
{
11-
public class ComponentInternalUsageDiagnoticsAnalyzerTest : AnalyzerTestBase
11+
public class ComponentInternalUsageDiagnosticsAnalyzerTest : AnalyzerTestBase
1212
{
13-
public ComponentInternalUsageDiagnoticsAnalyzerTest()
13+
public ComponentInternalUsageDiagnosticsAnalyzerTest()
1414
{
1515
Analyzer = new ComponentInternalUsageDiagnosticAnalyzer();
1616
Runner = new ComponentAnalyzerDiagnosticAnalyzerRunner(Analyzer);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Microsoft.AspNetCore.Components.RenderTree;
22

3-
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnoticsAnalyzerTest
3+
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
44
{
55
class UsesRenderTreeFrameAsParameter
66
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using Microsoft.AspNetCore.Components.RenderTree;
33

4-
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnoticsAnalyzerTest
4+
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
55
{
66
class UsesRenderTreeFrameTypeAsLocal
77
{

src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class WebAssemblyHostExtensions
2222
public static void Run(this IWebAssemblyHost host)
2323
{
2424
// Behave like async void, because we don't yet support async-main properly on WebAssembly.
25-
// However, don't actualy make this method async, because we rely on startup being synchronous
25+
// However, don't actually make this method async, because we rely on startup being synchronous
2626
// for things like attaching navigation event handlers.
2727
host.StartAsync().ContinueWith(task =>
2828
{

src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ public bool IsEnabled(LogLevel logLevel)
2020

2121
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
2222
{
23+
if (!IsEnabled(logLevel))
24+
{
25+
return;
26+
}
27+
2328
var formattedMessage = formatter(state, exception);
2429
Console.WriteLine($"[{logLevel}] {formattedMessage}");
2530
}

src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,15 @@
436436

437437
<!-- Clear the contents of /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker -->
438438
<Delete Files="$(BlazorIntermediateLinkerOutputPath)*.dll" />
439+
440+
441+
<PropertyGroup>
442+
<_MonoLinkerDotNetPath>$(DOTNET_HOST_PATH)</_MonoLinkerDotNetPath>
443+
<_MonoLinkerDotNetPath Condition="'$(_MonoLinkerDotNetPath)' == ''">dotnet</_MonoLinkerDotNetPath>
444+
</PropertyGroup>
439445

440446
<!-- Run the linker and put the results in /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker -->
441-
<Exec Command="dotnet &quot;$(MonoLinkerPath)&quot; $(_BlazorLinkerAdditionalOptions) @(_BlazorFolderLookupPaths, ' ') -o &quot;$(BlazorIntermediateLinkerOutputPath)&quot; @(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')" />
447+
<Exec Command="$(_MonoLinkerDotNetPath) &quot;$(MonoLinkerPath)&quot; $(_BlazorLinkerAdditionalOptions) @(_BlazorFolderLookupPaths, ' ') -o &quot;$(BlazorIntermediateLinkerOutputPath)&quot; @(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')" />
442448

443449
<!-- Collect the contents of /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker/ -->
444450
<ItemGroup>

src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public class MyComponent : ComponentBase
9696
}
9797

9898
[Fact]
99-
public void Render_ChildComponent_TriesToSetNonParamter()
99+
public void Render_ChildComponent_TriesToSetNonParameter()
100100
{
101101
// Arrange
102102
AdditionalSyntaxTrees.Add(Parse(@"

0 commit comments

Comments
 (0)