Skip to content

Commit 9d19184

Browse files
committed
Merge
2 parents 3d401d9 + f335cc5 commit 9d19184

File tree

1,371 files changed

+60908
-43735
lines changed

Some content is hidden

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

1,371 files changed

+60908
-43735
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ insert_final_newline = true
1313

1414
[*.cs]
1515
indent_size = 4
16-
dotnet_sort_system_directives_first = true:warning
16+
dotnet_sort_system_directives_first = true
1717

1818
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]
1919
indent_size = 2

.github/CODEOWNERS

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
2+
# See https://help.github.com/articles/about-code-owners/
3+
4+
/global.json @aspnet/build
5+
/azure-pipelines.yml @aspnet/build
6+
/eng/ @aspnet/build
7+
/eng/common/ @dotnet-maestro-bot @dougbu
8+
/eng/Versions.props @dotnet-maestro-bot @dougbu
9+
/eng/Version.Details.xml @dotnet-maestro-bot @dougbu
10+
/src/Caching/ @tratcher @anurse
11+
/src/Configuration/ @tratcher @anurse
12+
/src/Hosting/ @tratcher @anurse
13+
/src/Primitives/ @tratcher @anurse
14+
/src/Shared/src/HostFactoryResolver/ @tratcher @anurse

.github/ISSUE_TEMPLATE/bug_report.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Bug report
33
about: Create a report about something that is not working
44
---
5+
### If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to [email protected]. Your report may be eligible for our [bug bounty](https://technet.microsoft.com/en-us/mt764065.aspx) but ONLY if it is reported through email.
56

67
### Describe the bug
78
A clear and concise description of what the bug is.

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ packages/
99
artifacts/
1010
PublishProfiles/
1111
.vs/
12-
.dotnet/
1312
bower_components/
1413
node_modules/
1514
**/wwwroot/lib/
@@ -34,6 +33,9 @@ _ReSharper.*
3433
node_modules/
3534
**/[Cc]ompiler/[Rr]esources/**/*.js
3635
.vscode/
37-
global.json
36+
.testPublish/
3837
BenchmarkDotNet.Artifacts/
3938
*.binlog
39+
dist/
40+
.dotnet/
41+
.packages/

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
44

55
## General feedback and discussions?
6-
Please start a discussion on the [repo issue tracker](https://github.com/aspnet/AspNetCore/issues).
6+
Please start a discussion on the [repo issue tracker](https://github.com/aspnet/Extensions/issues).
77

88
## Reporting security issues and bugs
99
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094.aspx).
@@ -35,4 +35,4 @@ Your pull request will now go through extensive checks by the subject matter exp
3535

3636
## Code of conduct
3737

38-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
38+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

Directory.Build.props

+61-34
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,78 @@
11
<Project>
2-
<Import
3-
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
4-
Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />
5-
6-
<Import Project="version.props" />
7-
82
<PropertyGroup>
9-
<Product>Microsoft .NET Extensions</Product>
3+
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
104
<RepositoryUrl>https://github.com/aspnet/Extensions</RepositoryUrl>
115
<RepositoryType>git</RepositoryType>
12-
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
13-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng\AspNetCore.snk</AssemblyOriginatorKeyFile>
14-
<SignAssembly>true</SignAssembly>
15-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
16-
17-
<ArtifactsDir>$(MSBuildThisFileDirectory)artifacts\</ArtifactsDir>
18-
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts\build\</PackageOutputPath>
19-
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\src\</SharedSourceRoot>
20-
<ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir>
21-
<BasePackageOutputPath>$(ArtifactsConfigurationDir)packages\</BasePackageOutputPath>
22-
<ProductPackageOutputPath>$(BasePackageOutputPath)product\</ProductPackageOutputPath>
23-
<InternalPackageOutputPath>$(BasePackageOutputPath)internal\</InternalPackageOutputPath>
6+
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
247

25-
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
26-
27-
<!--
28-
By default, all projects which produce packages are not intended to ship to NuGet.org as a product package.
29-
Packages which are intended to ship to NuGet.org must opt-in by setting this to true in their project file.
30-
-->
31-
<IsProductComponent>false</IsProductComponent>
8+
<!-- Set these before importing Arcade to override Arcade's defaults -->
9+
<IsUnitTestProject>false</IsUnitTestProject>
10+
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.FunctionalTests'))">true</IsUnitTestProject>
11+
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Specification.Tests'))">false</IsUnitTestProject>
3212

3313
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance'))">true</IsBenchmarkProject>
34-
<IsTestProject Condition="$(MSBuildProjectName.EndsWith('Tests')) OR $(MSBuildProjectName.EndsWith('.Test'))">true</IsTestProject>
3514
<IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
3615
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('samples'))">true</IsSampleProject>
3716

17+
<IsReferenceAssemblyProject>false</IsReferenceAssemblyProject>
18+
<IsReferenceAssemblyProject Condition="$(MSBuildProjectDirectory.EndsWith('ref'))">true</IsReferenceAssemblyProject>
19+
<OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)-ref</OutDirName>
20+
21+
<ExcludeFromSourceBuild Condition="'$(IsUnitTestProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsSampleProject)' == 'true'">true</ExcludeFromSourceBuild>
22+
</PropertyGroup>
23+
24+
<Import Project="eng\FlakyTests.BeforeArcade.props" />
25+
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
26+
<Import Project="eng\FlakyTests.AfterArcade.props" />
27+
28+
<PropertyGroup>
3829
<IncludeSymbols>true</IncludeSymbols>
30+
<!-- Always pass portable to override arcade sdk which uses embedded for local builds -->
31+
<DebugType>portable</DebugType>
32+
<Serviceable Condition="'$(Configuration)' == 'Release'">true</Serviceable>
33+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
34+
<PackageProjectUrl>https://asp.net</PackageProjectUrl>
35+
<NoPackageAnalysis>true</NoPackageAnalysis>
36+
<LangVersion>8.0</LangVersion>
37+
38+
<DefaultNetCoreTargetFramework>netcoreapp$(MajorVersion).$(MinorVersion)</DefaultNetCoreTargetFramework>
3939

40-
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
40+
<Product>Microsoft .NET Extensions</Product>
41+
<SignAssembly>true</SignAssembly>
42+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
43+
<!-- Enables Strict mode for Roslyn compiler -->
44+
<Features>strict</Features>
45+
46+
<!-- Automatically generate source for .resx files on-build. -->
47+
<GenerateResxSource>true</GenerateResxSource>
48+
<GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
49+
50+
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
51+
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\src\</SharedSourceRoot>
52+
53+
<NpmPackageDir>$(ArtifactsDir)npm\$(Configuration)\</NpmPackageDir>
54+
<ShippingNpmPackageOutputPath>$(NpmPackageDir)Shipping\</ShippingNpmPackageOutputPath>
4155
</PropertyGroup>
4256

43-
<Import Project="eng\Dependencies.props" />
44-
<Import Project="eng\PatchConfig.props" />
45-
<Import Project="eng\ProjectReferences.props" />
46-
<Import Project="eng\Sources.props" />
57+
<ItemGroup Condition=" '$(IsUnitTestProject)' == 'true' ">
58+
<ProjectReference Include="$(MSBuildThisFileDirectory)src\TestingUtils\Microsoft.AspNetCore.Testing\src\Microsoft.AspNetCore.Testing.csproj" />
59+
<Reference Include="Moq" />
60+
</ItemGroup>
61+
62+
<ItemDefinitionGroup Condition=" '$(IsUnitTestProject)' == 'true' ">
63+
<!-- Always copy content items in test projects into the build output directory. -->
64+
<Content>
65+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
66+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
67+
</Content>
68+
</ItemDefinitionGroup>
4769

48-
<ItemGroup>
49-
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
70+
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
71+
<Reference Include="Microsoft.DotNet.GenAPI" Version="$(MicrosoftDotNetGenApiPackageVersion)" PrivateAssets="All" />
5072
</ItemGroup>
73+
74+
<Import Project="eng\Dependencies.props" />
75+
<Import Project="eng\ProjectReferences.props" />
76+
<Import Project="eng\targets\Csharp.Refs.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />
77+
<Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
5178
</Project>

Directory.Build.targets

+30-18
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
<Project>
2-
<!-- Properties which should be set after the project has been evaluated -->
3-
<PropertyGroup>
4-
<PackageOutputPath Condition="'$(IsProductComponent)' == 'true' ">$(ProductPackageOutputPath)</PackageOutputPath>
5-
<PackageOutputPath Condition="'$(IsProductComponent)' != 'true' ">$(InternalPackageOutputPath)</PackageOutputPath>
6-
7-
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
8-
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
9-
</PropertyGroup>
10-
1+
<Project>
112
<!-- Properties which should be set after the project has been evaluated -->
123
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
134
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
14-
<IsPackable Condition="'$(IsPackable)' == '' AND ( '$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' ) ">false</IsPackable>
5+
<Description Condition=" '$(Description)' == ''">$(PackageId)</Description>
156
</PropertyGroup>
167

178
<Import Project="eng\Baseline.Designer.props" />
189

1910
<PropertyGroup Condition=" '$(IsPackable)' != 'false' AND '$(IsServicingBuild)' == 'true' ">
20-
<IsPackable>$(PackagesInPatch.Contains(' $(PackageId);'))</IsPackable>
11+
<IsPackageInThisPatch Condition="'$(IsPackageInThisPatch)' == ''">true</IsPackageInThisPatch>
12+
<!-- Suppress creation of .nupkg for servicing builds. -->
13+
<IsPackable Condition=" '$(IsPackageInThisPatch)' != 'true' ">false</IsPackable>
2114
</PropertyGroup>
2215

23-
<PropertyGroup Condition=" '$(IsPackable)' != 'true' AND '$(BaselinePackageVersion)' != '' ">
24-
<!-- This keeps assembly versions consistent across patches. If a package is not included in a patch, its assembly version should stay at the baseline. -->
25-
<AssemblyVersion>$(BaselinePackageVersion).0</AssemblyVersion>
16+
<PropertyGroup Condition=" '$(IsPackageInThisPatch)' != 'true' AND '$(BaselinePackageVersion)' != '' AND '$(IsServicingBuild)' == 'true' ">
17+
<!-- This keeps assembly and package versions consistent across patches. If a package is not included in a patch, its version should stay at the baseline. -->
18+
<AssemblyVersion Condition="$(BaselinePackageVersion.Contains('-'))">$(BaselinePackageVersion.Substring(0, $(BaselinePackageVersion.IndexOf('-')))).0</AssemblyVersion>
19+
<AssemblyVersion Condition="! $(BaselinePackageVersion.Contains('-'))">$(BaselinePackageVersion).0</AssemblyVersion>
2620
<!--
2721
Ideally, we would also set the project version to match the baseline in case NuGet turns a ProjectReference into a nuspec depenendency, but
2822
NuGet does not currently handle conflicts between packages and projects which have the same package id/version.
@@ -35,12 +29,30 @@
3529

3630
<PropertyGroup>
3731
<!-- Implementation projects are the projects which produce nuget packages or shipping assemblies. -->
38-
<IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</IsImplementationProject>
32+
<IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsTestAssetProject)' != 'true' AND '$(IsUnitTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' AND '$(IsReferenceAssemblyProject)' == 'false' ">true</IsImplementationProject>
33+
<!-- This determines whether a project is available as a <Reference> to other projects in this repo. -->
34+
<IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(PackAsTool)' != 'true' ">true</IsProjectReferenceProvider>
3935

40-
<!-- Suppress KoreBuild warnings about the mismatch of repo version and local project version. The versioning in this mega repo is sufficiently complicated that KoreBuild's validation isn't helpful. -->
41-
<VerifyVersion>false</VerifyVersion>
36+
<HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == '' AND '$(IsProjectReferenceProvider)' == 'true' AND '$(IsShipping)' == 'true'">true</HasReferenceAssembly>
37+
<HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == ''">false</HasReferenceAssembly>
4238
</PropertyGroup>
4339

40+
<ItemGroup>
41+
<!-- Track compiler separately from Arcade.-->
42+
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
43+
Version="$(MicrosoftNetCompilersToolsetVersion)"
44+
PrivateAssets="all"
45+
IsImplicitlyDefined="true" />
46+
</ItemGroup>
47+
48+
<ItemGroup Condition="'$(Language)' == 'C#' AND '$(IsReferenceAssemblyProject)' == 'true'">
49+
<Compile Include="$(SharedSourceRoot)ReferenceAssemblyInfo.cs" LinkBase="Properties" />
50+
</ItemGroup>
51+
4452
<Import Project="eng\targets\Packaging.targets" Condition=" '$(MSBuildProjectExtension)' == '.csproj' " />
4553
<Import Project="eng\targets\ResolveReferences.targets" Condition=" '$(DisableReferenceRestrictions)' != 'true' AND '$(MSBuildProjectExtension)' == '.csproj' " />
54+
<Import Project="eng\targets\ReferenceAssembly.targets" Condition=" '$(HasReferenceAssembly)' == 'true' " />
55+
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
56+
<Import Project="eng\Workarounds.AfterArcade.targets" />
57+
<Import Project="eng\targets\Npm.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
4658
</Project>

0 commit comments

Comments
 (0)