Skip to content

Commit

Permalink
Merge pull request #41696 from dotnet/main
Browse files Browse the repository at this point in the history
Merge main into live
  • Loading branch information
dotnet-policy-service[bot] authored Jul 10, 2024
2 parents 63fdab6 + 86f9c72 commit 1792f35
Show file tree
Hide file tree
Showing 137 changed files with 594 additions and 710 deletions.
52 changes: 48 additions & 4 deletions .openpublishing.redirection.csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,17 +400,21 @@
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/array-declaration-errors"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs7000.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs4013.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8400.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/feature-version-errors"
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs7000.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8153.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#conversion-to-expression-trees"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8154.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8155.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#conversion-to-expression-trees"
Expand All @@ -435,6 +439,10 @@
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8175.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#syntax-limitations-in-lambda-expressions"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8176.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8373.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
Expand All @@ -443,6 +451,10 @@
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8374.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8400.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/feature-version-errors"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8401.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/feature-version-errors"
Expand Down Expand Up @@ -1668,18 +1680,50 @@
"source_path_from_root": "/docs/csharp/misc/cs1621.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#syntax-limitations-in-lambda-expressions"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1622.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1623.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1624.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1625.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1626.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1627.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1628.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#syntax-limitations-in-lambda-expressions"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1629.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1631.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1632.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/lambda-expression-errors#syntax-limitations-in-lambda-expressions"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1637.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/iterator-yield"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1649.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
Expand Down
4 changes: 4 additions & 0 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,10 @@
"docs/ai/**/**.yml": "ce-skilling-ai-copilot"
},
"no-loc": {
"docs/orleans/**/**.md": [
"Grain",
"Grains"
],
"**/**.md": [
"Orleans"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/azure/includes/dotnet-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
| Common | NuGet [2.2.1](https://www.nuget.org/packages/Microsoft.Azure.Common/2.2.1) | | |
| Common - Dependencies | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Common.Dependencies/1.0.0) | | |
| Computer Vision | NuGet [7.0.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ComputerVision/7.0.1) | | GitHub [7.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.ComputerVision_6.0.0-preview.1/sdk/cognitiveservices/Vision.ComputerVision) |
| Cosmos DB | NuGet [3.41.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.41.0) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/cosmosdb) | GitHub [3.41.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) |
| Cosmos DB | NuGet [3.41.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.41.0)<br>NuGet [3.42.0-preview.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.42.0-preview.0) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/cosmosdb) | GitHub [3.41.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) |
| Custom Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomImageSearch) |
| Custom Image Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.CustomImageSearch/2.0.0) | | |
| Custom Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomSearch) |
Expand Down
28 changes: 23 additions & 5 deletions docs/core/distribution-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ When installed, .NET consists of several components that are laid out as follows
│ └── <sdk version> (3)
├── sdk-manifests (4) (*)
│ └── <sdk feature band version>
├── library-packs (4) (*)
├── library-packs (20) (*)
├── metadata (4) (*)
│ └── workloads
│ └── <sdk feature band version>
Expand All @@ -45,8 +45,10 @@ When installed, .NET consists of several components that are laid out as follows
│ │ └── <netstandard version> (15)
│ ├── Microsoft.NETCore.App.Runtime.<rid> (*)
│ │ └── <runtime version> (18)
│ └── Microsoft.AspNetCore.App.Runtime.<rid> (*)
│ └── <aspnetcore version> (18)
│ ├── Microsoft.AspNetCore.App.Runtime.<rid> (*)
│ │ └── <aspnetcore version> (18)
│ └── runtime.<rid>.Microsoft.DotNet.ILCompiler (*)
│ └── <runtime version> (19)
├── shared (*)
│ ├── Microsoft.NETCore.App (*)
│ │ └── <runtime version> (5)
Expand Down Expand Up @@ -77,7 +79,7 @@ While there's a single host, most of the other components are in versioned direc

- (3) **sdk/\<sdk version>** The SDK (also known as "the tooling") is a set of managed tools that are used to write and build .NET libraries and applications. The SDK includes the .NET CLI, the managed languages compilers, MSBuild, and associated build tasks and targets, NuGet, new project templates, and so on.

- (4) **sdk-manifests/\<sdk feature band version>** The names and versions of the assets that an optional workload installation requires are maintained in workload manifests stored in this folder. The folder name is the feature band version of the SDK. So for an SDK version such as 7.0.102, this folder would still be named 7.0.100. When a workload is installed, the following folders are created as needed for the workload's assets: *library-packs*, *metadata*, and *template-packs*. A distribution can create an empty */metadata/workloads/\<sdkfeatureband>/userlocal* file if workloads should be installed under a user path rather than in the *dotnet* folder. For more information, see GitHub issue [dotnet/installer#12104](https://github.com/dotnet/installer/issues/12104).
- (4) **sdk-manifests/\<sdk feature band version>** The names and versions of the assets that an optional workload installation requires are maintained in workload manifests stored in this folder. The folder name is the feature band version of the SDK. So for an SDK version such as 7.0.102, this folder would still be named 7.0.100. When a workload is installed, the following folders are created as needed for the workload's assets: *metadata* and *template-packs*. A distribution can create an empty */metadata/workloads/\<sdkfeatureband>/userlocal* file if workloads should be installed under a user path rather than in the *dotnet* folder. For more information, see GitHub issue [dotnet/installer#12104](https://github.com/dotnet/installer/issues/12104).

The **shared** folder contains frameworks. A shared framework provides a set of libraries at a central location so they can be used by different applications.

Expand Down Expand Up @@ -105,8 +107,18 @@ The **shared** folder contains frameworks. A shared framework provides a set of

- (18) **Microsoft.NETCore.App.Runtime.\<rid>/\<runtime version>,Microsoft.AspNetCore.App.Runtime.\<rid>/\<aspnetcore version>** These files enable building self-contained applications. These directories contain symbolic links to files in (2), (5) and (6).

- (19) **runtime.\<rid>.Microsoft.DotNet.ILCompiler/\<runtime version>** These files enable building NativeAOT applications for the target platform.

- (20) **library-packs** contains NuGet package files. The SDK is configured to use this folder as a NuGet source. The list of NuGet packages provided by a .NET build is described below.

The folders marked with `(*)` are used by multiple packages. Some package formats (for example, `rpm`) require special handling of such folders. The package maintainer must take care of this.

Package files added to `library-packs` (20) can be packages that Microsoft does not distribute for the target platform. The files can also be packages that Microsoft distributes and for which `library-packs` provides a package that was built from source to meet platform package distribution guidelines. The following packages are included by the .NET build:

| Package name | Published by Microsoft | Needed for |
|----|----|----|
| `Microsoft.DotNet.ILCompiler.<version>.nupkg`<br>`Microsoft.NET.ILLink.Tasks.<version>.nupkg` | &#x2611; | NativeAOT |

## Recommended packages

.NET versioning is based on the runtime component `[major].[minor]` version numbers.
Expand All @@ -121,9 +133,15 @@ The following lists the recommended packages:
- `dotnet-sdk-[major].[minor]` - Installs the latest SDK for specific runtime
- **Version:** \<sdk version>
- **Example:** dotnet-sdk-7.0
- **Contains:** (3),(4),(18)
- **Contains:** (3),(4),(18),(20)
- **Dependencies:** `dotnet-runtime-[major].[minor]`, `aspnetcore-runtime-[major].[minor]`, `dotnet-targeting-pack-[major].[minor]`, `aspnetcore-targeting-pack-[major].[minor]`, `netstandard-targeting-pack-[netstandard_major].[netstandard_minor]`, `dotnet-apphost-pack-[major].[minor]`, `dotnet-templates-[major].[minor]`

- `dotnet-sdk-aot-[major].[minor]` - Installs the SDK components for platform NativeAOT
- **Version:** \<sdk version>
- **Example:** dotnet-sdk-aot-9.0
- **Contains:** (19)
- **Dependencies:** `dotnet-sdk-[major].[minor]`, _compiler toolchain and developer packages for libraries that the .NET runtime depends on_

- `aspnetcore-runtime-[major].[minor]` - Installs a specific ASP.NET Core runtime
- **Version:** \<aspnetcore runtime version>
- **Example:** aspnetcore-runtime-7.0
Expand Down
21 changes: 21 additions & 0 deletions docs/core/testing/unit-testing-platform-faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Microsoft.Testing.Platform FAQ
description: Get answers to frequently asked questions about Microsoft.Testing.Platform.
author: Evangelink
ms.author: amauryleve
ms.date: 07/09/2024
---

# Microsoft.Testing.Platform FAQ

This article contains answers to commonly asked questions about `Microsoft.Testing.Platform`.

## error CS8892: Method 'TestingPlatformEntryPoint.Main(string[])' will not be used as an entry point because a synchronous entry point 'Program.Main(string[])' was found

Manually defining an entry point (`Main`) in test project, or referencing a test project into an application that already has an entry point, will result in conflict with the entry point generated by `Microsoft.Testing.Platform`. To avoid this issue take one of these steps:

- Remove your manually defined entry point, typically `Main` method in _Program.cs_, and let testing platform to generate one for you.

- Disable the generation of the entry point by setting `<GenerateTestingPlatformEntryPoint>false</GenerateTestingPlatformEntryPoint>` MSBuild property.

- Completely disable the transitive dependency to `Microsoft.Testing.Platform.MSBuild` by setting `<IsTestingPlatformApplication>false</IsTestingPlatformApplication>` MSBuild property. This is needed when you are referencing test project from a non-test project, for example: You have a console application referencing a test application.
12 changes: 12 additions & 0 deletions docs/core/testing/unit-testing-platform-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,18 @@ Specifies the minimum number of tests that are expected to run. By default, at l

The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is `TestResults` in the directory that contains the test application.

## MSBuild integration

The NuGet package [Microsoft.Testing.Platform.MSBuild](https://www.nuget.org/packages/Microsoft.Testing.Platform.MSBuild) provides various integrations for `Microsoft.Testing.Platform` with MSBuild:

- Support for `dotnet test`, see [dotnet test integration](./unit-testing-platform-integration-dotnet-test.md) for more information.
- Support for `ProjectCapability` required by `Visual Studio` and `Visual Studio Code` Test Explorers.
- Automatic generation of the entry point (`Main` method)
- Automatic generation of the configuration file

> [!NOTE]
> This integration works in a transitive way (a project that references another project referencing this package will behave as if it references the package) and can be disabled through the `IsTestingPlatformApplication` MSBuild property.

## See also

- [Microsoft.Testing.Platform and VSTest comparison](unit-testing-platform-vs-vstest.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/core/whats-new/dotnet-8/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MSBuild includes a new feature that makes it easier to incorporate data from MSB
|-----------------------------------|----------------------------------------------------------|
| `--getProperty:<PROPERTYNAME>` | Retrieves the MSBuild property with the specified name. |
| `--getItem:<ITEMTYPE>` | Retrieves MSBuild items of the specified type. |
| `--getTargetResults:<TARGETNAME>` | Retrieves the outputs from running the specified target. |
| `--getTargetResult:<TARGETNAME>` | Retrieves the outputs from running the specified target. |

Values are written to the standard output. Multiple or complex values are output as JSON, as shown in the following examples.

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/fundamentals/types/anonymous-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you don't specify member names in the anonymous type, the compiler gives the
> [!TIP]
> You can use .NET style rule [IDE0037](../../../fundamentals/code-analysis/style-rules/ide0037.md) to enforce whether inferred or explicit member names are preferred.
It is also possible to define a field by object of another type: class, struct or even another anonymous type. It is done by using the variable holding this object just like in the following example, where two anonymous types are created using already instantiated user-defined types. In both cases the `product` field in the anonymous type `shipment` and `shipmentWithBonus` will be of type `Product` containing it's default values of each field. And the `bonus` field will be of anonymous type created by the compiler.
It is also possible to define a field by object of another type: class, struct or even another anonymous type. It is done by using the variable holding this object just like in the following example, where two anonymous types are created using already instantiated user-defined types. In both cases the `product` field in the anonymous type `shipment` and `shipmentWithBonus` will be of type `Product` containing its default values of each field. And the `bonus` field will be of anonymous type created by the compiler.

:::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="snippet03":::

Expand Down
Loading

0 comments on commit 1792f35

Please sign in to comment.