Skip to content

Commit 4c4758e

Browse files
authored
Merge pull request #27168 from dotnet/publish-19037
Merge main into live
2 parents e3b679b + 2e29d39 commit 4c4758e

File tree

250 files changed

+2591
-3978
lines changed

Some content is hidden

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

250 files changed

+2591
-3978
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
162162
csharp_space_between_parentheses = false
163163
csharp_space_between_square_brackets = false
164164

165+
# Namespace preference
166+
csharp_style_namespace_declarations = file_scoped
167+
165168
# Types: use keywords instead of BCL types, and permit var only when the type is clear
166169
csharp_style_var_for_built_in_types = false:suggestion
167170
csharp_style_var_when_type_is_apparent = false:none

.github/workflows/build-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: 'Snippets 5000'
44
# Controls when the action will run. Triggers the workflow on push or pull request
55
# events on the main branch only.
66
on:
7-
pull_request_target:
7+
pull_request:
88
branches: [ main ]
99
types: [opened, synchronize, reopened]
1010

.github/workflows/markdownlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- ".markdownlint.json"
1010
- ".github/workflows/markdownlint.yml"
1111
- ".github/workflows/markdownlint-problem-matcher.json"
12-
pull_request_target:
12+
pull_request:
1313
paths:
1414
- "**/*.md"
1515
- ".markdownlint.json"

.openpublishing.redirection.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -989,12 +989,11 @@
989989
},
990990
{
991991
"source_path": "docs/csharp/csharp-6.md",
992-
"redirect_url": "/dotnet/csharp/whats-new/csharp-7"
992+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-60"
993993
},
994994
{
995995
"source_path": "docs/csharp/csharp-7.md",
996-
"redirect_url": "/dotnet/csharp/whats-new/csharp-7",
997-
"redirect_document_id": true
996+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-70"
998997
},
999998
{
1000999
"source_path": "docs/csharp/csharp.md",
@@ -1079,7 +1078,7 @@
10791078
},
10801079
{
10811080
"source_path": "docs/csharp/getting-started/whats-new.md",
1082-
"redirect_url": "/dotnet/csharp/whats-new/csharp-9"
1081+
"redirect_url": "/dotnet/csharp/whats-new/csharp-10"
10831082
},
10841083
{
10851084
"source_path": "docs/csharp/getting-started/with-visual-studio-2017.md",
@@ -3591,7 +3590,7 @@
35913590
},
35923591
{
35933592
"source_path": "docs/csharp/tutorials/exploration/csharp-7.yml",
3594-
"redirect_url": "/dotnet/csharp/whats-new/csharp-7"
3593+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-70"
35953594
},
35963595
{
35973596
"source_path": "docs/csharp/tutorials/exploration/patterns-objects.md",
@@ -3683,19 +3682,23 @@
36833682
},
36843683
{
36853684
"source_path": "docs/csharp/whats-new/csharp-6.md",
3686-
"redirect_url": "/dotnet/csharp/whats-new/csharp-9"
3685+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-60"
3686+
},
3687+
{
3688+
"source_path": "docs/csharp/whats-new/csharp-7.md",
3689+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-70"
36873690
},
36883691
{
36893692
"source_path": "docs/csharp/whats-new/csharp-7-1.md",
3690-
"redirect_url": "/dotnet/csharp/whats-new/csharp-7"
3693+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-71"
36913694
},
36923695
{
36933696
"source_path": "docs/csharp/whats-new/csharp-7-2.md",
3694-
"redirect_url": "/dotnet/csharp/whats-new/csharp-7"
3697+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-72"
36953698
},
36963699
{
36973700
"source_path": "docs/csharp/whats-new/csharp-7-3.md",
3698-
"redirect_url": "/dotnet/csharp/whats-new/csharp-7"
3701+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-73"
36993702
},
37003703
{
37013704
"source_path": "docs/csharp/whats-new.md",

api/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ description: "Learn more about: .NET API browser"
33
layout: ApiBrowserPage
44
hide_bc: true
55
title: .NET API browser
6-
quickFilterColumn1: net-5.0,netcore-3.1,netstandard-2.1,netframework-4.8
7-
quickFilterColumn2: xamarin-forms,aspnetcore-3.1,efcore-3.1,roslyn-dotnet
6+
quickFilterColumn1: net-6.0,netframework-4.8,netstandard-2.1
7+
quickFilterColumn2: aspnetcore-6.0,efcore-5.0,xamarin-forms
88
quickFilterColumn3: azure-dotnet,ml-dotnet,spark-dotnet
99
ms.topic: landing-page
1010
ms.custom: "updateeachrelease"
11-
ms.date: "01/24/2020"
11+
ms.date: 11/17/2021
1212
---
1313
# .NET API browser
1414

15-
Welcome to the .NET API browser – your one-stop shop for all .NET-based APIs from Microsoft. Start searching for any managed APIs by typing in the box below. You can learn more about the API browser [in our blog post](/teamblog/announcing-unified-dotnet-experience-on-docs). If you have any feedback, create a new issue in the [MicrosoftDocs/feedback repository on GitHub](https://github.com/MicrosoftDocs/feedback/issues).
15+
Welcome to the .NET API browser – your one-stop shop for all .NET-based APIs from Microsoft. Start searching for any managed APIs by typing in the box below.
16+
17+
You can learn more about the API browser [in our blog post](/teamblog/announcing-unified-dotnet-experience-on-docs). If you have any feedback, create a new issue in the [MicrosoftDocs/feedback repository on GitHub](https://github.com/MicrosoftDocs/feedback/issues).

docs/architecture/porting-existing-aspnet-apps/strategies-migrating-in-production.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Eventually, the entire facade layer corresponds to the new, modern implementatio
4545

4646
Multi-targeting is recommended for large apps that will be migrated over time and for teams applying the Strangler pattern approach. This approach can address `BindingRedirect` and package restoration challenges that surface from mixing [PackageReference](/nuget/consume-packages/package-references-in-project-files) and [packages.config](/nuget/reference/packages-config) restore styles. There are two options available for code that must run in both .NET Framework and .NET Core environments.
4747

48-
* Preprocessor [`#if` in C#](../../csharp/language-reference/preprocessor-directives.md#conditional-compilation) (or [`#If` in Visual Basic]([preprocessor `#if`](/dotnet/visual-basic/reference/language-specification/preprocessing-directives#conditional-compilation)) directives allow you to implement different functionality or use different dependencies when run in .NET Framework versus .NET Core.
48+
* Preprocessor directives ([#if in C#](../../csharp/language-reference/preprocessor-directives.md#conditional-compilation) or [#If in Visual Basic](/dotnet/visual-basic/reference/language-specification/preprocessing-directives#conditional-compilation)) allow you to implement different functionality or use different dependencies when run in .NET Framework versus .NET Core.
4949

5050
* Project files can use conditional [globbing patterns](../../core/project-sdk/overview.md#default-includes-and-excludes), such as `*.core.cs`, to include different sets of files based on which framework is being targeted.
5151

docs/azure/includes/dotnet-all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@
470470
| Management - Automanage | NuGet [0.1.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Automanage/0.1.0-preview) | | |
471471
| Management - Automation | NuGet [3.8.3-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Automation/3.8.3-preview) | [docs](/dotnet/api/overview/azure/automation) | GitHub [3.8.3-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/automation/Microsoft.Azure.Management.Automation) |
472472
| Management - Azure Stack HCI | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.AzureStackHCI/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.AzureStackHCI_1.0.0/sdk/azurestackhci/Microsoft.Azure.Management.AzureStackHCI/) |
473-
| Management - Azure VMware Solution | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Avs/2.0.0) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Avs_2.0.0/sdk/avs/Microsoft.Azure.Management.Avs/) |
473+
| Management - Azure VMware Solution | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Avs/3.0.0) | | GitHub [3.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Avs_3.0.0/sdk/avs/Microsoft.Azure.Management.Avs/) |
474474
| Management - Backup Services | NuGet [1.0.5-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.BackupServices/1.0.5-preview) | | |
475475
| Management - Batch | NuGet [14.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Batch/14.0.0) | [docs](/dotnet/api/overview/azure/batch) | GitHub [14.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Batch_14.0.0/sdk/batch/Microsoft.Azure.Management.Batch/) |
476476
| Management - Batch AI | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.BatchAI/2.0.0) | [docs](/dotnet/api/overview/azure/batchai) | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/batchai/Microsoft.Azure.Management.BatchAI) |

docs/core/compatibility/6.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ If you're migrating an app to .NET 6, the breaking changes listed here might aff
118118
| - | - | - | - |
119119
| [`-p` option for `dotnet run` is deprecated](sdk/6.0/deprecate-p-option-dotnet-run.md) | ✔️ || Preview 6 |
120120
| [C# code in templates not supported by earlier versions](sdk/6.0/csharp-template-code.md) | ✔️ | ✔️ | Preview 7 |
121+
| [EditorConfig files implicitly included](sdk/6.0/editorconfig-additional-files.md) | ✔️ || |
121122
| [Generate apphost for macOS](sdk/6.0/apphost-generated-for-macos.md) | ✔️ || Preview 6 |
122123
| [Generate error for duplicate files in publish output](sdk/6.0/duplicate-files-in-output.md) || ✔️ | Preview 1 |
123124
| [GetTargetFrameworkProperties and GetNearestTargetFramework removed from ProjectReference protocol](sdk/6.0/gettargetframeworkproperties-and-getnearesttargetframework-removed.md) || ✔️ | Preview 1 |
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Breaking change: EditorConfig files implicitly included"
3+
description: Learn about the breaking change in .NET 6 where .editorconfig files can no longer be AdditionalFiles items.
4+
ms.date: 11/17/2021
5+
---
6+
# EditorConfig files implicitly included
7+
8+
Roslyn analyzers added support for parsing and respecting *.editorconfig* file options before the compiler added support for these files. To work around this limitation, *.editorconfig* files had to be included as `AdditionalFiles` project items. Now that the compiler implicitly includes *.editorconfig* files in a project, you'll get an error if you include them as *AdditionalFiles* project items.
9+
10+
## Version introduced
11+
12+
.NET 6
13+
14+
## Previous behavior
15+
16+
*.editorconfig* files could be included as `AdditionalFiles` project items.
17+
18+
## New behavior
19+
20+
Starting with the .NET 6 SDK, you'll get the following error at compile time if you include an *.editorconfig* file as an `AdditionalFiles` project item:
21+
22+
**error AD0001: Analyzer [...] threw an exception of type 'System.InvalidOperationException' with message 'Passing '.editorconfig' files as additional files is no longer needed. It will be implicitly discovered (if the file is in the project's directory or any ancestor directory), or it should be converted into a 'globalconfig'.**
23+
24+
## Change category
25+
26+
This change may affect [source compatibility](../../categories.md#source-compatibility).
27+
28+
## Reason for change
29+
30+
The compiler now supports *.editorconfig* files, and they're implicitly included in a project if the file is in the project directory or an ancestor directory.
31+
32+
## Recommended action
33+
34+
- If the *.editorconfig* file is in the project directory or an ancestor directory, remove the `<AdditionalFiles>` item for the *.editorconfig* file from your project file.
35+
- Otherwise, convert the *.editorconfig* file to a [Global AnalyzerConfig](../../../../fundamentals/code-analysis/configuration-files.md#global-analyzerconfig) file, and change the `AdditionalFiles` item to a `GlobalAnalyzerConfigFiles` item in your project file.
36+
37+
## Affected APIs
38+
39+
N/A

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ items:
159159
href: sdk/6.0/deprecate-p-option-dotnet-run.md
160160
- name: C# code in templates not supported by earlier versions
161161
href: sdk/6.0/csharp-template-code.md
162+
- name: EditorConfig files implicitly included
163+
href: sdk/6.0/editorconfig-additional-files.md
162164
- name: Generate apphost for macOS
163165
href: sdk/6.0/apphost-generated-for-macos.md
164166
- name: Generate error for duplicate files in publish output
@@ -841,6 +843,8 @@ items:
841843
href: sdk/6.0/deprecate-p-option-dotnet-run.md
842844
- name: C# code in templates not supported by earlier versions
843845
href: sdk/6.0/csharp-template-code.md
846+
- name: EditorConfig files implicitly included
847+
href: sdk/6.0/editorconfig-additional-files.md
844848
- name: Generate apphost for macOS
845849
href: sdk/6.0/apphost-generated-for-macos.md
846850
- name: Generate error for duplicate files in publish output

0 commit comments

Comments
 (0)