Skip to content

Commit 590fe38

Browse files
committed
Merge in 'release/2.2' changes
2 parents 291b346 + 9556cc1 commit 590fe38

File tree

83 files changed

+576
-996
lines changed

Some content is hidden

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

83 files changed

+576
-996
lines changed

.azure/pipelines/pr-validation-temp.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ jobs:
2828
jobDisplayName: "Build only : Linux"
2929
agentOs: Linux
3030
buildArgs: '/p:SkipTests=true'
31+
- job: Code_check
32+
displayName: Code check
33+
workspace:
34+
clean: all
35+
pool:
36+
vmImage: vs2017-win2016
37+
steps:
38+
- powershell: ./eng/scripts/CodeCheck.ps1 -ci

build/artifacts.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@
170170
<PackageArtifact Include="Microsoft.EntityFrameworkCore.Tools" Category="ship" />
171171
<PackageArtifact Include="Microsoft.EntityFrameworkCore" Category="ship" />
172172
<PackageArtifact Include="Microsoft.Extensions.ApiDescription.Design" Category="noship" />
173-
<PackageArtifact Include="Microsoft.Extensions.ApplicationModelDetection" Category="noship" />
174173
<PackageArtifact Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Category="ship" />
175174
<PackageArtifact Include="Microsoft.Extensions.Identity.Core" Category="ship" />
176175
<PackageArtifact Include="Microsoft.Extensions.Identity.Stores" Category="ship" />
@@ -185,7 +184,6 @@
185184
<PackageArtifact Include="Microsoft.VisualStudio.Web.CodeGeneration.Utils" Category="ship" />
186185
<PackageArtifact Include="Microsoft.VisualStudio.Web.CodeGeneration" Category="ship" />
187186
<PackageArtifact Include="Microsoft.VisualStudio.Web.CodeGenerators.Mvc" Category="ship" />
188-
<PackageArtifact Include="Microsoft.Web.Xdt.Extensions" Category="shipoob" />
189187

190188
<PackageArtifact Include="Internal.WebHostBuilderFactory.Sources" Category="noship"/>
191189
</ItemGroup>

build/buildorder.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<RepositoryBuildOrder Include="EntityFrameworkCore" Order="8" />
1111
<RepositoryBuildOrder Include="MvcPrecompilation" Order="15" RootPath="$(RepositoryRoot)src\MvcPrecompilation\" />
1212
<RepositoryBuildOrder Include="Scaffolding" Order="15" />
13-
<RepositoryBuildOrder Include="AzureIntegration" Order="15" RootPath="$(RepositoryRoot)src\AzureIntegration\" />
1413
<RepositoryBuildOrder Include="MusicStore" Order="16" RootPath="$(RepositoryRoot)src\MusicStore\" />
1514
<RepositoryBuildOrder Include="SignalR" Order="16" RootPath="$(RepositoryRoot)src\SignalR\" />
1615
<RepositoryBuildOrder Include="AuthSamples" Order="16" RootPath="$(RepositoryRoot)src\AuthSamples\" />

build/repo.props

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,23 @@
5151
<SharedFrameworkName Include="Microsoft.AspNetCore.App" />
5252
</ItemGroup>
5353

54+
<ItemGroup>
55+
<!-- These projects use 'legacy' csproj, which is not supported by dotnet-msbuild. -->
56+
<ProjectToExclude Include="
57+
$(RepositoryRoot)src\Servers\HttpSys\samples\TestClient\TestClient.csproj;
58+
$(RepositoryRoot)src\Middleware\WebSockets\samples\TestServer\TestServer.csproj;
59+
"
60+
Condition=" '$(MSBuildRuntimeType)' == 'Core' " />
61+
62+
<!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. -->
63+
<ProjectToExclude Include="
64+
$(RepositoryRoot)src\Middleware\WebSockets\samples\**\*.csproj;
65+
$(RepositoryRoot)src\Middleware\NodeServices.Sockets\**\*.csproj;
66+
$(RepositoryRoot)src\Tools\dotnet-watch\test\TestProjects\**\*.csproj;
67+
$(RepositoryRoot)src\Razor\Razor.Design\test\testassets\**\*.*proj
68+
" />
69+
</ItemGroup>
70+
5471
<Choose>
5572
<!-- Project selection can be overridden on the command line by passing in -projects -->
5673
<When Condition="'$(Projects)' != ''">
@@ -64,24 +81,6 @@
6481

6582
<ProjectToExclude Include="@(SamplesProject)" Condition="'$(BuildSamples)' == 'false' "/>
6683

67-
<!-- These projects use 'legacy' csproj, which is not supported by dotnet-msbuild. -->
68-
<ProjectToExclude Include="
69-
$(RepositoryRoot)src\Servers\HttpSys\samples\TestClient\TestClient.csproj;
70-
$(RepositoryRoot)src\Middleware\WebSockets\samples\TestServer\TestServer.csproj;
71-
"
72-
Condition=" '$(MSBuildRuntimeType)' == 'Core' " />
73-
74-
<!-- Exclude the WPF samples for now because they use classic .csproj, which is not yet supported in our build. -->
75-
<ProjectToExclude Include="$(RepositoryRoot)src\Identity\Identity\samples\NativeWPFClient\NativeWPFClient.csproj;" />
76-
77-
<!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. -->
78-
<ProjectToExclude Include="
79-
$(RepositoryRoot)src\Middleware\WebSockets\samples\**\*.csproj;
80-
$(RepositoryRoot)src\Middleware\NodeServices.Sockets\**\*.csproj;
81-
$(RepositoryRoot)src\Tools\dotnet-watch\test\TestProjects\**\*.csproj;
82-
$(RepositoryRoot)src\Razor\Razor.Design\test\testassets\**\*.*proj
83-
" />
84-
8584
<NpmProjectDirectory Include="$(RepositoryRoot)src\Middleware\CORS\test\FunctionalTests\" />
8685

8786
<ProjectToBuild Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' " Include="$(RepositoryRoot)src\Servers\**\*.vcxproj">

build/repo.targets

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@
3535
<Target Name="RestoreNpm" Condition="@(NpmProjectDirectory->Count()) != 0">
3636
<Message Text="Restoring NPM modules" Importance="high" />
3737

38-
<PropertyGroup>
39-
<NpmInstallCommand Condition=" '$(CI)' != 'true' ">install --no-optional</NpmInstallCommand>
40-
<NpmInstallCommand Condition=" '$(CI)' == 'true' ">ci</NpmInstallCommand>
41-
</PropertyGroup>
42-
43-
<Exec Command="npm $(NpmInstallCommand)" WorkingDirectory="%(NpmProjectDirectory.Identity)" Condition=" '%(NpmProjectDirectory.Identity)' != '' " />
38+
<!-- Always run `npm ci` because `npm install` has a tendancy to churn package-lock.json for no apparent reason. -->
39+
<Exec Command="npm ci" WorkingDirectory="%(NpmProjectDirectory.Identity)" Condition=" '%(NpmProjectDirectory.Identity)' != '' " />
4440
</Target>
4541

4642
<Target Name="PrepareOutputPaths">

build/submodules.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49-
<ShippedRepository Include="AzureIntegration" RootPath="$(RepositoryRoot)src\AzureIntegration\" />
50-
<ShippedRepository Include="MetaPackages" RootPath="$(RepositoryRoot)src\MetaPackages\" PatchPolicy="CascadeVersions" />
5149
<ShippedRepository Include="MvcPrecompilation" RootPath="$(RepositoryRoot)src\MvcPrecompilation\"/>
5250
<ShippedRepository Include="SignalR" RootPath="$(RepositoryRoot)src\SignalR\" />
5351
</ItemGroup>

eng/Baseline.Designer.props

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,37 @@
4444
<BaselinePackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="[2.2.0, )" />
4545
<BaselinePackageReference Include="Microsoft.AspNetCore.Mvc" Version="[2.2.0, )" />
4646
</ItemGroup>
47+
<!-- Package: Microsoft.AspNetCore.ApplicationInsights.HostingStartup-->
48+
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup' ">
49+
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
50+
</PropertyGroup>
51+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup' AND '$(TargetFramework)' == 'net461' ">
52+
<BaselinePackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="[2.1.1, )" />
53+
<BaselinePackageReference Include="Microsoft.AspNetCore.Hosting" Version="[2.2.0, )" />
54+
<BaselinePackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="[2.2.0, )" />
55+
<BaselinePackageReference Include="Microsoft.Extensions.Configuration.Json" Version="[2.2.0, )" />
56+
<BaselinePackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="[2.2.0, )" />
57+
<BaselinePackageReference Include="Microsoft.Extensions.Logging" Version="[2.2.0, )" />
58+
<BaselinePackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="[2.2.0, )" />
59+
</ItemGroup>
60+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup' AND '$(TargetFramework)' == 'netcoreapp2.0' ">
61+
<BaselinePackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="[2.1.1, )" />
62+
<BaselinePackageReference Include="Microsoft.AspNetCore.Hosting" Version="[2.2.0, )" />
63+
<BaselinePackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="[2.2.0, )" />
64+
<BaselinePackageReference Include="Microsoft.Extensions.Configuration.Json" Version="[2.2.0, )" />
65+
<BaselinePackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="[2.2.0, )" />
66+
<BaselinePackageReference Include="Microsoft.Extensions.Logging" Version="[2.2.0, )" />
67+
<BaselinePackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="[2.2.0, )" />
68+
</ItemGroup>
69+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup' AND '$(TargetFramework)' == 'netcoreapp2.1' ">
70+
<BaselinePackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="[2.1.1, )" />
71+
<BaselinePackageReference Include="Microsoft.AspNetCore.Hosting" Version="[2.2.0, )" />
72+
<BaselinePackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="[2.2.0, )" />
73+
<BaselinePackageReference Include="Microsoft.Extensions.Configuration.Json" Version="[2.2.0, )" />
74+
<BaselinePackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="[2.2.0, )" />
75+
<BaselinePackageReference Include="Microsoft.Extensions.Logging" Version="[2.2.0, )" />
76+
<BaselinePackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="[2.2.0, )" />
77+
</ItemGroup>
4778
<!-- Package: Microsoft.AspNetCore.AspNetCoreModule-->
4879
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AspNetCoreModule' ">
4980
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
@@ -187,6 +218,30 @@
187218
<BaselinePackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="[2.2.0, )" />
188219
<BaselinePackageReference Include="Microsoft.Extensions.Options" Version="[2.2.0, )" />
189220
</ItemGroup>
221+
<!-- Package: Microsoft.AspNetCore.AzureAppServices.HostingStartup-->
222+
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AzureAppServices.HostingStartup' ">
223+
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
224+
</PropertyGroup>
225+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AzureAppServices.HostingStartup' AND '$(TargetFramework)' == 'net461' ">
226+
<BaselinePackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="[2.2.0, )" />
227+
<BaselinePackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="[2.2.0, )" />
228+
</ItemGroup>
229+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AzureAppServices.HostingStartup' AND '$(TargetFramework)' == 'netcoreapp2.0' ">
230+
<BaselinePackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="[2.2.0, )" />
231+
<BaselinePackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="[2.2.0, )" />
232+
</ItemGroup>
233+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AzureAppServices.HostingStartup' AND '$(TargetFramework)' == 'netcoreapp2.1' ">
234+
<BaselinePackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="[2.2.0, )" />
235+
<BaselinePackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="[2.2.0, )" />
236+
</ItemGroup>
237+
<!-- Package: Microsoft.AspNetCore.AzureAppServicesIntegration-->
238+
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AzureAppServicesIntegration' ">
239+
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
240+
</PropertyGroup>
241+
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AzureAppServicesIntegration' AND '$(TargetFramework)' == 'netstandard2.0' ">
242+
<BaselinePackageReference Include="Microsoft.AspNetCore.Hosting" Version="[2.2.0, )" />
243+
<BaselinePackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="[2.2.0, )" />
244+
</ItemGroup>
190245
<!-- Package: Microsoft.AspNetCore.Connections.Abstractions-->
191246
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Connections.Abstractions' ">
192247
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>

eng/Baseline.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.
1111
<Package Id="dotnet-watch" Version="2.2.0" />
1212
<Package Id="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
1313
<Package Id="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="2.2.0-preview-35687" />
14+
<Package Id="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="2.2.0" />
1415
<Package Id="Microsoft.AspNetCore.AspNetCoreModule" Version="2.2.0" />
1516
<Package Id="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="2.2.0" />
1617
<Package Id="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />
@@ -29,6 +30,8 @@ build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.
2930
<Package Id="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
3031
<Package Id="Microsoft.AspNetCore.Authorization.Policy" Version="2.2.0" />
3132
<Package Id="Microsoft.AspNetCore.Authorization" Version="2.2.0" />
33+
<Package Id="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="2.2.0" />
34+
<Package Id="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="2.2.0" />
3235
<Package Id="Microsoft.AspNetCore.Connections.Abstractions" Version="2.2.0" />
3336
<Package Id="Microsoft.AspNetCore.CookiePolicy" Version="2.2.0" />
3437
<Package Id="Microsoft.AspNetCore.Cors" Version="2.2.0" />

eng/ProjectReferences.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@
123123
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" ProjectPath="$(RepositoryRoot)src\Mvc\src\Microsoft.AspNetCore.Mvc.WebApiCompatShim\Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj" />
124124
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc" ProjectPath="$(RepositoryRoot)src\Mvc\src\Microsoft.AspNetCore.Mvc\Microsoft.AspNetCore.Mvc.csproj" />
125125
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Tasks" ProjectPath="$(RepositoryRoot)src\Mvc\src\Microsoft.Extensions.ApiDescription.Design\Microsoft.Extensions.ApiDescription.Design.csproj" />
126+
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" ProjectPath="$(RepositoryRoot)src\Azure\ApplicationInsights.HostingStartup\src\Microsoft.AspNetCore.ApplicationInsights.HostingStartup.csproj" />
126127
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" ProjectPath="$(RepositoryRoot)src\Azure\AzureAD\Authentication.AzureAD.UI\src\Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj" />
127128
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" ProjectPath="$(RepositoryRoot)src\Azure\AzureAD\Authentication.AzureADB2C.UI\src\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj" />
129+
<ProjectReferenceProvider Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" ProjectPath="$(RepositoryRoot)src\Azure\AzureAppServices.HostingStartup\src\Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj" />
130+
<ProjectReferenceProvider Include="Microsoft.AspNetCore.AzureAppServicesIntegration" ProjectPath="$(RepositoryRoot)src\Azure\AzureAppServicesIntegration\src\Microsoft.AspNetCore.AzureAppServicesIntegration.csproj" />
128131
</ItemGroup>
129132
</Project>

eng/scripts/CodeCheck.ps1

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#requires -version 5
2+
<#
3+
.SYNOPSIS
4+
This script runs a quick check for common errors, such as checking that Visual Studio solutions are up to date or that generated code has been committed to source.
5+
#>
6+
param(
7+
[switch]$ci
8+
)
9+
10+
$ErrorActionPreference = 'Stop'
11+
Set-StrictMode -Version 1
12+
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
13+
14+
$repoRoot = Resolve-Path "$PSScriptRoot/../../"
15+
16+
[string[]] $errors = @()
17+
18+
try {
19+
#
20+
# Solutions
21+
#
22+
23+
Write-Host "Checking that solutions are up to date"
24+
25+
Get-ChildItem "$repoRoot/*.sln" -Recurse | % {
26+
Write-Host " Checking $(Split-Path -Leaf $_)"
27+
$slnDir = Split-Path -Parent $_
28+
$sln = $_
29+
& dotnet sln $_ list `
30+
| ? { $_ -ne 'Project(s)' -and $_ -ne '----------' } `
31+
| % {
32+
$proj = Join-Path $slnDir $_
33+
if (-not (Test-Path $proj)) {
34+
$errors += "Missing project. Solution references a project which does not exist: $proj. [$sln] "
35+
}
36+
}
37+
}
38+
39+
#
40+
# Generated code check
41+
#
42+
43+
Write-Host "Re-running code generation"
44+
45+
Invoke-Block {
46+
[string[]] $generateArgs = @()
47+
if ($ci) {
48+
$generateArgs += '-ci'
49+
}
50+
& $repoRoot/build.cmd /t:GenerateProjectList @generateArgs
51+
}
52+
53+
Write-Host "git diff"
54+
& git diff --ignore-space-at-eol --exit-code
55+
if ($LastExitCode -ne 0) {
56+
$status = git status -s | Out-String
57+
$status = $status -replace "`n","`n "
58+
$errors += "Generated code is not up to date."
59+
}
60+
}
61+
finally {
62+
foreach ($err in $errors) {
63+
Write-Host -f Red "error : $err"
64+
}
65+
66+
if ($errors) {
67+
exit 1
68+
}
69+
}

0 commit comments

Comments
 (0)