diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json
index bfaf313158f1a..511ccf182ddc2 100644
--- a/.openpublishing.redirection.core.json
+++ b/.openpublishing.redirection.core.json
@@ -1231,6 +1231,10 @@
"source_path_from_root": "/docs/core/testing/unit-testing-with-copilot.md",
"redirect_url": "/visualstudio/ide/copilot-chat-context#slash-commands"
},
+ {
+ "source_path_from_root": "/docs/core/additional-tools/xml-serializer-generator.md",
+ "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/xml-serializer-generator"
+ },
{
"source_path_from_root": "/docs/core/tools/cli-msbuild-architecture.md",
"redirect_url": "/dotnet/core/tools/dotnet-migrate"
diff --git a/docs/ai/quickstarts/publish-mcp-registry.md b/docs/ai/quickstarts/publish-mcp-registry.md
new file mode 100644
index 0000000000000..8238b2495149d
--- /dev/null
+++ b/docs/ai/quickstarts/publish-mcp-registry.md
@@ -0,0 +1,296 @@
+---
+title: Quickstart - Publish a .NET MCP server to the MCP Registry
+description: Learn how to publish your NuGet-based MCP server to the Official MCP Registry, including creating a server.json manifest, updating your package README, and using the MCP Publisher tool.
+ms.date: 11/17/2025
+ms.topic: quickstart
+author: joelverhagen
+zone_pivot_groups: operating-systems-set-one
+ai-usage: ai-assisted
+---
+
+# Publish an MCP server on NuGet.org to the Official MCP Registry
+
+In this quickstart, you publish your NuGet-based local MCP server to the [Official MCP Registry](https://github.com/modelcontextprotocol/registry/blob/main/docs/explanations/ecosystem-vision.md).
+
+The Official MCP Registry is an *upstream data source* for the MCP ecosystem. Other MCP registries, such as the [GitHub MCP Registry](https://github.com/mcp), will soon use the Official MCP Registry as a source of MCP server listings.
+
+> [!NOTE]
+> This guide focuses on publishing **local MCP servers** packaged with NuGet. The Official MCP Registry also supports **remote MCP servers**. While the `server.json` publishing process is similar for remote servers, their configuration requires a URL instead of a package manager reference. Remote servers can be implemented in any language. For an example, see [an Azure Functions code sample for a .NET remote MCP server](/samples/azure-samples/remote-mcp-functions-dotnet/remote-mcp-functions-dotnet/).
+
+## Prerequisites
+
+- A [GitHub account](https://github.com/join)
+- [Visual Studio Code](https://code.visualstudio.com/)
+- Your MCP server is packaged with NuGet and published to NuGet.org ([quickstart](./build-mcp-server.md)).
+
+## Create a server.json manifest file
+
+*If you used the NuGet MCP server quickstart and `mcpserver` project template, you can skip this step.*
+
+1. Navigate to your MCP server's source directory and create a new `server.json` file.
+ ::: zone pivot="os-windows"
+
+ ```powershell
+ cd path\my\project
+
+ # create and open the server.json file
+ code .mcp\server.json
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-linux"
+
+ ```bash
+ cd path/my/project
+
+ # create and open the server.json file
+ code .mcp/server.json
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-macos"
+
+ ```bash
+ cd path/my/project
+
+ # create and open the server.json file
+ code .mcp/server.json
+ ```
+
+ ::: zone-end
+2. Use this content to start with and fill in the placeholders.
+ :::code language="json" source="snippets/mcp-registry/server.json":::
+3. Save the file.
+
+Use this reference to understand more about the fields:
+
+| Property | Example | Purpose |
+| ----------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
+| `name` | `io.github.contoso/data-mcp` | Unique identifier for the MCP server, namespaced using reverse DNS names, **case sensitive** |
+| `version` | `0.1.0-beta` | Version of the MCP server listing
Consider using the same version as the MCP server package on NuGet.org |
+| `description` | `Access Contoso data in your AI agent` | Description of your MCP server, up to 100 characters |
+| `title` | `Contoso Data` | Optional: short human-readable title, up to 100 characters |
+| `websiteUrl` | `https://contoso.com/docs/mcp` | Optional: URL to the server's homepage, documentation, or project website |
+| `packages` `identifier` | `Contoso.Data.Mcp` | The ID of your MCP server package on NuGet.org |
+| `packages` `version` | `0.1.0-beta` | The version of your MCP server package on NuGet.org |
+| `repository` `url` | `https://github.com/contoso/data-mcp` | Optional: GitHub repository URL |
+
+The `name` field has two parts, separated by a forward slash `/`. The first part is a namespace based off of a reverse DNS name. The authentication method you use in later steps will give you access to a specific namespace. For example, using GitHub-based authentication will give you access to `io.github./*`. The second part, after the forward slash, is a custom identifier for your server within the namespace. Think of this much like a NuGet package ID. It should be unchanging and descriptive of your MCP server. Using your GitHub repository name is a reasonable option if you only have one MCP server published from that repository.
+
+## Update your package README
+
+The Official MCP Registry verifies that your MCP server package references the `name` specified in your `server.json` file.
+
+1. If you haven't already, add a README.md to your MCP server NuGet package. See [how to do this in your project file](/nuget/reference/msbuild-targets#packagereadmefile).
+2. Open the README.md used by your NuGet package.
+ ::: zone pivot="os-windows"
+
+ ```powershell
+ code path\to\README.md
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-linux"
+
+ ```bash
+ code path/to/README.md
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-macos"
+
+ ```bash
+ code path/to/README.md
+ ```
+
+ ::: zone-end
+3. Add the following line to your README.md. Since it is enclosed in an HTML comment, it can be anywhere and won't be rendered.
+
+ ```markdown
+
+ ```
+
+ Example:
+
+ ```markdown
+
+ ```
+
+4. Save the README.md file.
+
+## Publish your MCP server package to NuGet.org
+
+Because your README.md now has an `mcp-name` declared in it, publish the latest package to NuGet.org.
+
+1. If needed, update your package version and the respective version strings in your `server.json`.
+2. Pack your project so the latest README.md version is contained.
+
+ ```bash
+ dotnet pack
+ ```
+
+3. Push it to NuGet.org either [via the website](https://www.nuget.org/packages/manage/upload) or using the CLI:
+ ::: zone pivot="os-windows"
+
+ ```powershell
+ dotnet push bin\Release\*.nupkg -k -s https://api.nuget.org/v3/index.json
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-linux"
+
+ ```bash
+ dotnet push bin/Release/*.nupkg -k -s https://api.nuget.org/v3/index.json
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-macos"
+
+ ```bash
+ dotnet push bin/Release/*.nupkg -k -s https://api.nuget.org/v3/index.json
+ ```
+
+ ::: zone-end
+
+## Wait for your package to become available
+
+NuGet.org performs validations against your package before making it available so you must wait to publish your MCP server to the Official MCP Registry since it verifies that the package is accessible.
+
+To wait for your package to become available, either continue to periodically refresh the package details page on NuGet.org until the validating message disappears, or use the following PowerShell script to poll for availability.
+
+```powershell
+$id = "".ToLowerInvariant()
+$version = "".ToLowerInvariant()
+$url = "https://api.nuget.org/v3-flatcontainer/$id/$version/readme"
+$elapsed = 0; $interval = 10; $timeout = 300
+Write-Host "Checking for package README of $id $version."
+while ($true) {
+ if ($elapsed -gt $timeout) {
+ Write-Error "Package README is not available after $elapsed seconds. URL: $url"
+ exit 1
+ }
+ try {
+ Invoke-WebRequest -Uri $url -ErrorAction Stop | Out-Null
+ Write-Host "Package README is now available."
+ break
+ } catch {
+ Write-Host "Package README is not yet available. Elapsed time: $elapsed seconds."
+ Start-Sleep -Seconds $interval; $elapsed += $interval
+ continue
+ }
+}
+```
+
+This script can be leveraged in a CI/CD pipeline to ensure the next step (publishing to the Official MCP Registry) does not happen before the NuGet package is available.
+
+## Download the MCP Publisher tool
+
+1. Download the `mcp-publisher-*.tar.gz` file from the Official MCP Registry GitHub repository that matches your CPU architecture.
+ ::: zone pivot="os-windows"
+ - Windows x64: [mcp-publisher_windows_amd64.tar.gz](https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_windows_amd64.tar.gz)
+ - Windows Arm64: [mcp-publisher_windows_arm64.tar.gz](https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_windows_arm64.tar.gz)
+ ::: zone-end
+ ::: zone pivot="os-linux"
+ - Linux x64: [mcp-publisher_linux_amd64.tar.gz](https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz)
+ - Linux Arm64: [mcp-publisher_linux_arm64.tar.gz](https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_arm64.tar.gz)
+ ::: zone-end
+ ::: zone pivot="os-macos"
+ - macOS x64: [mcp-publisher_darwin_amd64.tar.gz](https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_darwin_amd64.tar.gz)
+ - macOS Arm64: [mcp-publisher_darwin_arm64.tar.gz](https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_darwin_arm64.tar.gz)
+ ::: zone-end
+ See the full list of assets in the [latest release](https://github.com/modelcontextprotocol/registry/releases/latest).
+2. Extract the downloaded .tar.gz to the current directory.
+ ::: zone pivot="os-windows"
+
+ ```powershell
+ # For Windows x64
+ tar xf 'mcp-publisher_windows_amd64.tar.gz'
+
+ # For Windows ARM64
+ tar xf 'mcp-publisher_windows_arm64.tar.gz'
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-linux"
+
+ ```bash
+ # For Linux x64
+ tar xf 'mcp-publisher_linux_amd64.tar.gz'
+
+ # For Linux ARM64
+ tar xf 'mcp-publisher_linux_arm64.tar.gz'
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-macos"
+
+ ```bash
+ # For macOS x64
+ tar xf 'mcp-publisher_darwin_amd64.tar.gz'
+
+ # For macOS ARM64
+ tar xf 'mcp-publisher_darwin_arm64.tar.gz'
+ ```
+
+ ::: zone-end
+
+## Publish to the Official MCP Registry
+
+The Official MCP Registry has different authentication mechanisms based on the namespace MCP server's `name`. In this guide, we are using a namespace based on GitHub (`io.github./*`) so GitHub authentication must be used. See the [registry documentation for information on other authentication modes](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/authentication.mdx), which unlock other namespaces.
+
+1. Log in using GitHub interactive authentication.
+ ::: zone pivot="os-windows"
+
+ ```powershell
+ .\mcp-publisher.exe login github
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-linux"
+
+ ```bash
+ ./mcp-publisher login github
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-macos"
+
+ ```bash
+ ./mcp-publisher login github
+ ```
+
+ ::: zone-end
+ Follow the instructions provided by the tool. You will provide a code to GitHub in your web browser to complete the flow.
+
+ Once the flow is complete, you will be able to publish `server.json` files to the `io.github./*` namespace.
+
+2. Publish your `server.json` file to the Official MCP Registry.
+ ::: zone pivot="os-windows"
+
+ ```powershell
+ .\mcp-publisher.exe publish path\to\.mcp\server.json
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-linux"
+
+ ```bash
+ ./mcp-publisher publish path/to/.mcp/server.json
+ ```
+
+ ::: zone-end
+ ::: zone pivot="os-macos"
+
+ ```bash
+ ./mcp-publisher publish path/to/.mcp/server.json
+ ```
+
+ ::: zone-end
+3. When the command succeeds, you can verify that your MCP server is published by going to the [registry home page](https://registry.modelcontextprotocol.io/) and searching for your server name.
+
+## Related content
+
+- [Build and publish an MCP server to NuGet.org](./build-mcp-server.md)
+- [Publish a NuGet package](/nuget/nuget-org/publish-a-package)
+- [Conceptual: MCP servers in NuGet Packages](/nuget/concepts/nuget-mcp)
+- [Get started with .NET AI and the Model Context Protocol](../get-started-mcp.md)
diff --git a/docs/ai/quickstarts/snippets/mcp-registry/server.json b/docs/ai/quickstarts/snippets/mcp-registry/server.json
new file mode 100644
index 0000000000000..2abeac759b7be
--- /dev/null
+++ b/docs/ai/quickstarts/snippets/mcp-registry/server.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
+ "name": "io.github./",
+ "version": "",
+ "description": "",
+ "title": "",
+ "websiteUrl": "",
+ "packages": [
+ {
+ "registryType": "nuget",
+ "identifier": "",
+ "version": "",
+ "transport": {
+ "type": "stdio"
+ },
+ "packageArguments": [],
+ "environmentVariables": []
+ }
+ ],
+ "repository": {
+ "url": "https://github.com//",
+ "source": "github"
+ }
+}
diff --git a/docs/ai/toc.yml b/docs/ai/toc.yml
index c18445eb66441..c140ef40ed2d5 100644
--- a/docs/ai/toc.yml
+++ b/docs/ai/toc.yml
@@ -84,10 +84,12 @@ items:
href: get-started-app-chat-scaling-with-azure-container-apps.md
- name: MCP client/server
items:
- - name: Build a minimal MCP server and publish to NuGet
- href: quickstarts/build-mcp-server.md
- name: Build a minimal MCP client
href: quickstarts/build-mcp-client.md
+ - name: Build a minimal MCP server and publish to NuGet
+ href: quickstarts/build-mcp-server.md
+ - name: Publish to the Official MCP Registry
+ href: quickstarts/publish-mcp-registry.md
- name: Security and content safety
items:
- name: Authentication for Azure-hosted apps and services
diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md b/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md
index d59d0322c669d..a427eff8e3040 100644
--- a/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md
+++ b/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md
@@ -216,9 +216,6 @@ The `IHostedService` interface provides a convenient way to start background tas
## Additional resources
-- **Building a scheduled task in ASP.NET Core/Standard 2.0** \
-
-
- **Implementing IHostedService in ASP.NET Core 2.0** \
diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md
index 34ad6d3c3bc06..a7ff52b307bd7 100644
--- a/docs/azure/includes/dotnet-all.md
+++ b/docs/azure/includes/dotnet-all.md
@@ -203,7 +203,7 @@
| Resource Management - Chaos | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Chaos/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Chaos-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Chaos_1.1.0/sdk/chaos/Azure.ResourceManager.Chaos/) |
| Resource Management - Cloudhealth | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.CloudHealth/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.CloudHealth-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CloudHealth_1.0.0-beta.1/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/) |
| Resource Management - Cognitive Services | NuGet [1.5.2](https://www.nuget.org/packages/Azure.ResourceManager.CognitiveServices/1.5.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CognitiveServices-readme) | GitHub [1.5.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CognitiveServices_1.5.2/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/) |
-| Resource Management - Communication | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.2.1/sdk/communication/Azure.ResourceManager.Communication/) |
+| Resource Management - Communication | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.3.0/sdk/communication/Azure.ResourceManager.Communication/) |
| Resource Management - Compute | NuGet [1.13.0](https://www.nuget.org/packages/Azure.ResourceManager.Compute/1.13.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Compute-readme) | GitHub [1.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Compute_1.13.0/sdk/compute/Azure.ResourceManager.Compute/) |
| Resource Management - Compute Fleet | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ComputeFleet/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ComputeFleet-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ComputeFleet_1.0.0/sdk/computefleet/Azure.ResourceManager.ComputeFleet/) |
| Resource Management - Compute Schedule | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ComputeSchedule/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ComputeSchedule/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ComputeSchedule-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ComputeSchedule_1.1.0/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ComputeSchedule_1.2.0-beta.1/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/) |
@@ -237,7 +237,7 @@
| Resource Management - Database Watcher | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DatabaseWatcher/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DatabaseWatcher-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DatabaseWatcher_1.0.0-beta.1/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/) |
| Resource Management - Datadog | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Datadog-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0/sdk/datadog/Azure.ResourceManager.Datadog/) |
| Resource Management - Defender EASM | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.DefenderEasm/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.DefenderEasm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DefenderEasm_1.0.0-beta.3/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/) |
-| Resource Management - Dell.Storage | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Dell.Storage/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dell.Storage-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dell.Storage_1.0.0-beta.1/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/) |
+| Resource Management - Dell.Storage | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Dell.Storage/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dell.Storage-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dell.Storage_1.0.0/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/) |
| Resource Management - Dependencymap | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DependencyMap/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DependencyMap-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DependencyMap_1.0.0-beta.1/sdk/dependencymap/Azure.ResourceManager.DependencyMap/) |
| Resource Management - Deployment Manager | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.DeploymentManager/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.DeploymentManager-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeploymentManager_1.0.0-beta.3/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/) |
| Resource Management - Desktop Virtualization | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.DesktopVirtualization/1.3.2) | [docs](/dotnet/api/overview/azure/ResourceManager.DesktopVirtualization-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DesktopVirtualization_1.3.2/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/) |
diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md
index 79985e60f3a63..761e7bf2e6a31 100644
--- a/docs/azure/includes/dotnet-new.md
+++ b/docs/azure/includes/dotnet-new.md
@@ -215,7 +215,7 @@
| Resource Management - Chaos | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Chaos/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Chaos-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Chaos_1.1.0/sdk/chaos/Azure.ResourceManager.Chaos/) |
| Resource Management - Cloudhealth | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.CloudHealth/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.CloudHealth-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CloudHealth_1.0.0-beta.1/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/) |
| Resource Management - Cognitive Services | NuGet [1.5.2](https://www.nuget.org/packages/Azure.ResourceManager.CognitiveServices/1.5.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CognitiveServices-readme) | GitHub [1.5.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CognitiveServices_1.5.2/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/) |
-| Resource Management - Communication | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.2.1/sdk/communication/Azure.ResourceManager.Communication/) |
+| Resource Management - Communication | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.3.0/sdk/communication/Azure.ResourceManager.Communication/) |
| Resource Management - Compute | NuGet [1.13.0](https://www.nuget.org/packages/Azure.ResourceManager.Compute/1.13.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Compute-readme) | GitHub [1.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Compute_1.13.0/sdk/compute/Azure.ResourceManager.Compute/) |
| Resource Management - Compute Fleet | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ComputeFleet/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ComputeFleet-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ComputeFleet_1.0.0/sdk/computefleet/Azure.ResourceManager.ComputeFleet/) |
| Resource Management - Compute Schedule | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ComputeSchedule/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ComputeSchedule/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ComputeSchedule-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ComputeSchedule_1.1.0/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ComputeSchedule_1.2.0-beta.1/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/) |
@@ -249,7 +249,7 @@
| Resource Management - Database Watcher | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DatabaseWatcher/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DatabaseWatcher-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DatabaseWatcher_1.0.0-beta.1/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/) |
| Resource Management - Datadog | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Datadog-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0/sdk/datadog/Azure.ResourceManager.Datadog/) |
| Resource Management - Defender EASM | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.DefenderEasm/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.DefenderEasm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DefenderEasm_1.0.0-beta.3/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/) |
-| Resource Management - Dell.Storage | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Dell.Storage/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dell.Storage-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dell.Storage_1.0.0-beta.1/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/) |
+| Resource Management - Dell.Storage | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Dell.Storage/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dell.Storage-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dell.Storage_1.0.0/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/) |
| Resource Management - Dependencymap | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DependencyMap/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DependencyMap-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DependencyMap_1.0.0-beta.1/sdk/dependencymap/Azure.ResourceManager.DependencyMap/) |
| Resource Management - Deployment Manager | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.DeploymentManager/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.DeploymentManager-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeploymentManager_1.0.0-beta.3/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/) |
| Resource Management - Desktop Virtualization | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.DesktopVirtualization/1.3.2) | [docs](/dotnet/api/overview/azure/ResourceManager.DesktopVirtualization-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DesktopVirtualization_1.3.2/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/) |
diff --git a/docs/core/additional-tools/xml-serializer-generator.md b/docs/core/additional-tools/xml-serializer-generator.md
deleted file mode 100644
index 839ad497f2e75..0000000000000
--- a/docs/core/additional-tools/xml-serializer-generator.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-title: "Microsoft XML Serializer Generator"
-description: An overview of the Microsoft XML Serializer Generator. Use the XML Serializer Generator to generate an XML serialization assembly for the types contained in your project.
-author: honggit
-ms.date: 04/23/2024
-ms.topic: tutorial
-ms.custom: "mvc"
----
-# Use Microsoft XML Serializer Generator on .NET Core
-
-In this tutorial, you learn how to use the Microsoft XML Serializer Generator in a C# application. During the course of this tutorial, you learn:
-
-> [!div class="checklist"]
->
-> - How to create a .NET console app
-> - How to add a reference to the Microsoft.XmlSerializer.Generator package
-> - How to edit your MyApp.csproj to add dependencies
-> - How to add a class and an XmlSerializer
-> - How to build and run the application
-
-Like the [Xml Serializer Generator (sgen.exe)](../../standard/serialization/xml-serializer-generator-tool-sgen-exe.md) for .NET Framework, the [Microsoft.XmlSerializer.Generator NuGet package](https://www.nuget.org/packages/Microsoft.XmlSerializer.Generator) is the equivalent for .NET Core/.NET 5+ and .NET Standard projects. It creates an XML serialization assembly for types contained in an assembly to improve the startup performance of XML serialization when serializing or de-serializing objects of those types using .
-
-## Prerequisites
-
-To complete this tutorial:
-
-- [.NET Core 2.1 SDK](https://dotnet.microsoft.com/download) or later.
-- Your favorite code editor.
-
-> [!TIP]
-> Need to install a code editor? Try [Visual Studio](https://aka.ms/vsdownload?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link)!
-
-The following instructions show you how to use XML Serializer Generator in a .NET Core console application.
-
-## Create the app
-
-1. Open a command prompt and create a folder named *MyApp*. Navigate to the folder you created and type the following command:
-
- ```dotnetcli
- dotnet new console
- ```
-
-2. Add a reference to the Microsoft.XmlSerializer.Generator package.
-
- ```dotnetcli
- dotnet add package Microsoft.XmlSerializer.Generator -v 8.0.0
- ```
-
- After running this command, the following lines are added to your *MyApp.csproj* project file:
-
- ```xml
-
-
-
- ```
-
-3. Add a tool reference by adding the following `ItemGroup` section to your project file.
-
- ```xml
-
-
-
- ```
-
-4. Open *Program.cs* in your text editor. Add a class named *MyClass* in *Program.cs*.
-
- ```csharp
- public class MyClass
- {
- public int Value;
- }
- ```
-
-5. Create an `XmlSerializer` for `MyClass`. Add the following line to the *Program.cs* file:
-
- ```csharp
- var serializer = new System.Xml.Serialization.XmlSerializer(typeof(MyClass));
- ```
-
-6. Build and run the application. Run the application via [`dotnet run`](../tools/dotnet-run.md):
-
- ```dotnetcli
- dotnet run
- ```
-
- The app automatically loads and uses the pre-generated serializers at runtime.
-
- > [!TIP]
- > [`dotnet run`](../tools/dotnet-run.md) calls [`dotnet build`](../tools/dotnet-build.md) to ensure that the build targets have been built, and then calls `dotnet ` to run the target application.
-
-> [!IMPORTANT]
-> The commands and steps shown in this tutorial to run your application are used during development time only. Once you're ready to deploy your app, take a look at the different [deployment strategies](../deploying/index.md) for .NET apps and the [`dotnet publish`](../tools/dotnet-publish.md) command.
-
-If everything succeeds, an assembly named *MyApp.XmlSerializers.dll* is generated in the output folder.
-
-Congratulations! You have just:
-> [!div class="checklist"]
->
-> - Created a .NET console app.
-> - Added a reference to the Microsoft.XmlSerializer.Generator package.
-> - Edited your MyApp.csproj to add dependencies.
-> - Added a class and an XmlSerializer.
-> - Built and run the application.
-
-## Further customize XML serialization assembly (optional)
-
-Add the following XML to your *MyApp.csproj* to further customize assembly generation:
-
-```xml
-
- C:\myfolder\abc.dll;C:\myfolder\def.dll
- MyApp.MyClass;MyApp.MyClass1
- false
- true
- mykey.snk
- true
-
-```
-
-## Related resources
-
-- [Introducing XML Serialization](../../standard/serialization/introducing-xml-serialization.md)
-- [How to serialize using XmlSerializer (C#)](../../standard/linq/serialize-xmlserializer.md)
-- [How to: Serialize Using XmlSerializer (Visual Basic)](../../standard/linq/serialize-xmlserializer.md)
diff --git a/docs/core/compatibility/8.0.md b/docs/core/compatibility/8.0.md
index b8f983742b8c0..54adaabf15f28 100644
--- a/docs/core/compatibility/8.0.md
+++ b/docs/core/compatibility/8.0.md
@@ -77,6 +77,7 @@ If you're migrating an app to .NET 8, the breaking changes listed here might aff
| ----------------------------------------------------------------------- | ----------------- |
| [Host determines RID-specific assets](deployment/8.0/rid-asset-list.md) | Binary incompatible/behavioral change |
| [.NET Monitor only includes distroless images](deployment/8.0/monitor-image.md) | Behavioral change |
+| [.NET packages for openSUSE and SLES depend on OpenSSL 3.x](deployment/8.0/opensuse-sles-openssl3-dependency.md) | Behavioral change |
| [StripSymbols defaults to true](deployment/8.0/stripsymbols-default.md) | Behavioral change |
## Entity Framework Core
diff --git a/docs/core/compatibility/deployment/8.0/opensuse-sles-openssl3-dependency.md b/docs/core/compatibility/deployment/8.0/opensuse-sles-openssl3-dependency.md
new file mode 100644
index 0000000000000..ef074b41b0cf4
--- /dev/null
+++ b/docs/core/compatibility/deployment/8.0/opensuse-sles-openssl3-dependency.md
@@ -0,0 +1,53 @@
+---
+title: "Breaking change: .NET packages for openSUSE and SLES depend on OpenSSL 3.x"
+description: "Learn about the breaking change in .NET 8 where .NET packages for openSUSE and SLES distributions now depend on OpenSSL 3.x instead of OpenSSL 1.x."
+ms.date: 01/05/2026
+ms.custom: https://github.com/dotnet/runtime/issues/122653
+ai-usage: ai-assisted
+---
+# .NET packages for openSUSE and SLES depend on OpenSSL 3.x
+
+The dependency requirements for .NET packages on openSUSE and SUSE Enterprise Linux Server (SLES) distributions have been updated to depend on OpenSSL 3.x instead of OpenSSL 1.x. This change applies to .NET 6, 7, 8, and later versions installed via package managers on these distributions.
+
+## Version introduced
+
+.NET 8 (also applies to .NET 6 and .NET 7)
+
+## Previous behavior
+
+Previously, .NET packages for openSUSE and SLES distributions specified OpenSSL 1.x as a package dependency. When you installed .NET via the package manager, the system required OpenSSL 1.x libraries to be present.
+
+## New behavior
+
+Starting in .NET 8, .NET packages for openSUSE and SLES distributions specify OpenSSL 3.x as a package dependency. When you install .NET via the package manager, the system requires OpenSSL 3.x libraries to be present. This change has also been applied to .NET 6 and .NET 7 packages.
+
+## Type of breaking change
+
+This change is a [behavioral change](../../categories.md#behavioral-change).
+
+## Reason for change
+
+Some newer versions of openSUSE and SLES distributions no longer offer OpenSSL 1.x in their package repositories, which broke the dependency requirements for .NET packages. Since .NET 6 and later versions already support OpenSSL 3.x at runtime, updating the package dependencies to require OpenSSL 3.x instead of 1.x resolves installation issues on these newer distributions.
+
+For more information, see [dotnet/runtime#122443](https://github.com/dotnet/runtime/issues/122443).
+
+## Recommended action
+
+Most users don't need to take any action. The package manager automatically installs the correct OpenSSL 3.x dependencies when you install or update .NET packages.
+
+However, if your system has both OpenSSL 1.x and OpenSSL 3.x installed, and this change causes issues with other software on your system, you might need to:
+
+- Adjust your system configuration to accommodate both versions.
+- Update other software that depends on OpenSSL 1.x to use OpenSSL 3.x.
+- Stop installing .NET via packages and use an alternative installation method, such as manual installation from tarballs.
+
+If you encounter issues, consult your distribution's documentation for managing multiple OpenSSL versions.
+
+## Affected APIs
+
+None.
+
+## See also
+
+- [dotnet/runtime#122443](https://github.com/dotnet/runtime/issues/122443)
+- [dotnet/runtime#122653](https://github.com/dotnet/runtime/issues/122653)
diff --git a/docs/core/compatibility/networking/10.0/uri-length-limits-removed.md b/docs/core/compatibility/networking/10.0/uri-length-limits-removed.md
index cf329d6d131a0..feefde322f4b0 100644
--- a/docs/core/compatibility/networking/10.0/uri-length-limits-removed.md
+++ b/docs/core/compatibility/networking/10.0/uri-length-limits-removed.md
@@ -18,7 +18,7 @@ Methods that create instances (constructors and instance whose length exceeded around 65,000 characters. Code like the following example threw a with the message "Invalid URI: The Uri string is too long."
```csharp
-new Uri($"https://host/{new string('a', 100_000)}")
+new Uri($"https://host/{new string('a', 100_000)}");
```
## New behavior
diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml
index c83d1fb7215ff..a7a3f63691dc5 100644
--- a/docs/core/compatibility/toc.yml
+++ b/docs/core/compatibility/toc.yml
@@ -460,6 +460,8 @@ items:
href: deployment/8.0/rid-asset-list.md
- name: .NET Monitor only includes distroless images
href: deployment/8.0/monitor-image.md
+ - name: .NET packages for openSUSE and SLES depend on OpenSSL 3.x
+ href: deployment/8.0/opensuse-sles-openssl3-dependency.md
- name: StripSymbols defaults to true
href: deployment/8.0/stripsymbols-default.md
- name: Entity Framework Core
diff --git a/docs/core/install/linux-opensuse.md b/docs/core/install/linux-opensuse.md
index 55d8242556fe1..2b4a4c33bae64 100644
--- a/docs/core/install/linux-opensuse.md
+++ b/docs/core/install/linux-opensuse.md
@@ -122,7 +122,10 @@ When you install with a package manager, these libraries are installed for you.
- krb5
- libicu
-- libopenssl1_1
+- libopenssl3 (OpenSSL 3.x)
+
+> [!IMPORTANT]
+> Starting with .NET 8, .NET packages for openSUSE depend on OpenSSL 3.x (libopenssl3). This change also applies to .NET 6 and .NET 7 packages. For more information, see [.NET packages for openSUSE and SLES depend on OpenSSL 3.x](../compatibility/deployment/8.0/opensuse-sles-openssl3-dependency.md).
Dependencies can be installed with the `zypper install` command. The following snippet demonstrates installing the `krb5` library:
diff --git a/docs/core/install/linux-sles.md b/docs/core/install/linux-sles.md
index 6fe4e7a8a7ddc..d9284abe05808 100644
--- a/docs/core/install/linux-sles.md
+++ b/docs/core/install/linux-sles.md
@@ -121,9 +121,10 @@ When you install with a package manager, these libraries are installed for you.
- krb5
- libicu
-- libopenssl1_1
+- libopenssl3 (OpenSSL 3.x)
-If the target runtime environment's OpenSSL version is 1.1 or newer, install the `compat-openssl10` package.
+> [!IMPORTANT]
+> Starting with .NET 8, .NET packages for SLES depend on OpenSSL 3.x (libopenssl3). This change also applies to .NET 6 and .NET 7 packages. For more information, see [.NET packages for openSUSE and SLES depend on OpenSSL 3.x](../compatibility/deployment/8.0/opensuse-sles-openssl3-dependency.md).
Dependencies can be installed with the `zypper install` command. The following snippet demonstrates installing the `krb5` library:
diff --git a/docs/core/testing/microsoft-testing-platform-extensions-vstest-bridge.md b/docs/core/testing/microsoft-testing-platform-extensions-vstest-bridge.md
index 233b7208f6e4e..692a350459725 100644
--- a/docs/core/testing/microsoft-testing-platform-extensions-vstest-bridge.md
+++ b/docs/core/testing/microsoft-testing-platform-extensions-vstest-bridge.md
@@ -49,7 +49,7 @@ Loggers in `Microsoft.Testing.Platform` are configured through command-line para
## VSTest filter support
-This extension also offer the ability to use VSTest filtering mechanism to discover or run only the tests that matches the filter expression. For more information, see the [Filter option details](../tools/dotnet-test.md#filter-option-details) section or for framework specific details see the [Running selective unit tests](./selective-unit-tests.md) page.
+This extension also offer the ability to use VSTest filtering mechanism to discover or run only the tests that matches the filter expression. For more information, see the [Filter option details](../tools/dotnet-test-vstest.md#filter-option-details) section or for framework specific details see the [Running selective unit tests](./selective-unit-tests.md) page.
When enabled by the test framework, you can use `--filter `.
diff --git a/docs/core/testing/microsoft-testing-platform-intro.md b/docs/core/testing/microsoft-testing-platform-intro.md
index cf7cf7939dbd4..6db94a1fcbd74 100644
--- a/docs/core/testing/microsoft-testing-platform-intro.md
+++ b/docs/core/testing/microsoft-testing-platform-intro.md
@@ -40,7 +40,7 @@ The main driving factors for the evolution of the new testing platform are detai
* MSTest. In MSTest, the support of `Microsoft.Testing.Platform` is done via [MSTest runner](unit-testing-mstest-runner-intro.md).
* NUnit. In NUnit, the support of `Microsoft.Testing.Platform` is done via [NUnit runner](unit-testing-nunit-runner-intro.md).
-* xUnit.net: In xUnit.net, the support of `Microsoft.Testing.Platform` is done via [xUnit.net runner](https://xunit.net/docs/getting-started/v3/microsoft-testing-platform).
+* xUnit.net. For more information, see [Microsoft Testing Platform (xUnit.net v3)](https://xunit.net/docs/getting-started/v3/microsoft-testing-platform) and [Microsoft Testing Platform (xUnit.net v2)](https://xunit.net/docs/getting-started/v2/microsoft-testing-platform) from the xUnit.net documentation.
* TUnit: entirely constructed on top of the `Microsoft.Testing.Platform`, for more information, see [TUnit documentation](https://tunit.dev/).
## Run and debug tests
diff --git a/docs/core/testing/selective-unit-tests.md b/docs/core/testing/selective-unit-tests.md
index aa0d6436e3942..7a5d0eee4ea68 100644
--- a/docs/core/testing/selective-unit-tests.md
+++ b/docs/core/testing/selective-unit-tests.md
@@ -235,7 +235,7 @@ For more information, see [TestCase filter](https://github.com/Microsoft/vstest-
## See also
- [dotnet test](../tools/dotnet-test.md)
-- [dotnet test --filter](../tools/dotnet-test.md#filter-option-details)
+- [dotnet test --filter](../tools/dotnet-test-vstest.md#filter-option-details)
## Next steps
diff --git a/docs/core/tools/dotnet-test-mtp.md b/docs/core/tools/dotnet-test-mtp.md
new file mode 100644
index 0000000000000..c349763cc2d77
--- /dev/null
+++ b/docs/core/tools/dotnet-test-mtp.md
@@ -0,0 +1,208 @@
+---
+title: dotnet test command with Microsoft.Testing.Platform
+description: The dotnet test command is used to execute unit tests in a given project using Microsoft.Testing.Platform (MTP).
+ms.date: 12/29/2024
+ai-usage: ai-assisted
+---
+# dotnet test with Microsoft.Testing.Platform (MTP)
+
+**This article applies to:** ✔️ .NET 10 SDK and later versions
+
+## Name
+
+`dotnet test` - .NET test driver used to execute unit tests with Microsoft.Testing.Platform.
+
+## Synopsis
+
+```dotnetcli
+dotnet test
+ [--project ]
+ [--solution ]
+ [--test-modules ]
+ [--root-directory ]
+ [--max-parallel-test-modules ]
+ [-a|--arch ]
+ [-c|--configuration ]
+ [-f|--framework ]
+ [--os ]
+ [-r|--runtime ]
+ [-v|--verbosity ]
+ [--no-build]
+ [--no-restore]
+ [--no-ansi]
+ [--no-progress]
+ [--output ]
+ [--no-launch-profile]
+ [--no-launch-profile-arguments]
+ [...]
+
+dotnet test -h|--help
+```
+
+## Description
+
+With Microsoft Testing Platform, `dotnet test` operates faster than with VSTest. The test-related arguments are no longer fixed, as they are tied to the registered extensions in the test project(s). Moreover, MTP supports a globbing filter when running tests. For more information, see [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md).
+
+> [!WARNING]
+> When Microsoft.Testing.Platform is opted in via `global.json`, `dotnet test` expects all test projects to use Microsoft.Testing.Platform. It is an error if any of the test projects use VSTest.
+
+## Implicit restore
+
+[!INCLUDE[dotnet restore note](~/includes/dotnet-restore-note.md)]
+
+## Options
+
+> [!NOTE]
+> You can use only one of the following options at a time: `--project`, `--solution`, or `--test-modules`. These options can't be combined.
+> In addition, when using `--test-modules`, you can't specify `--arch`, `--configuration`, `--framework`, `--os`, or `--runtime`. These options aren't relevant for an already-built module.
+
+- **`--project `**
+
+ Specifies the path of the project file to run (folder name or full path). If not specified, it defaults to the current directory.
+
+- **`--solution `**
+
+ Specifies the path of the solution file to run (folder name or full path). If not specified, it defaults to the current directory.
+
+- **`--test-modules `**
+
+ Filters test modules using file globbing in .NET. Only tests belonging to those test modules will run. For more information and examples on how to use file globbing in .NET, see [File globbing](../extensions/file-globbing.md).
+
+- **`--root-directory `**
+
+ Specifies the root directory of the `--test-modules` option. It can only be used with the `--test-modules` option.
+
+- **`--max-parallel-test-modules `**
+
+ Specifies the maximum number of test modules that can run in parallel. The default is .
+
+- [!INCLUDE [arch](includes/cli-arch.md)]
+
+- [!INCLUDE [configuration](includes/cli-configuration.md)]
+
+- **`-f|--framework `**
+
+ The [target framework moniker (TFM)](../../standard/frameworks.md) of the target framework to run tests for. The target framework must also be specified in the project file.
+
+- [!INCLUDE [os](includes/cli-os.md)]
+
+- **`-r|--runtime `**
+
+ The target runtime to test for.
+
+ Short form `-r` available starting in .NET SDK 7.
+
+ > [!NOTE]
+ > Running tests for a solution with a global `RuntimeIdentifier` property (explicitly or via `--arch`, `--runtime`, or `--os`) isn't supported. Set `RuntimeIdentifier` on an individual project level instead.
+
+- [!INCLUDE [verbosity](includes/cli-verbosity.md)]
+
+- **`--no-build`**
+
+ Specifies that the test project isn't built before being run. It also implicitly sets the `--no-restore` flag.
+
+- **`--no-restore`**
+
+ Specifies that an implicit restore isn't executed when running the command.
+
+- **`--no-ansi`**
+
+ Disables outputting ANSI escape characters to screen.
+
+- **`--no-progress`**
+
+ Disables reporting progress to screen.
+
+- **`--output `**
+
+ Specifies the output verbosity when reporting tests. Valid values are `Normal` and `Detailed`. The default is `Normal`.
+
+- **`--no-launch-profile`**
+
+ Don't attempt to use launchSettings.json to configure the application. By default, `launchSettings.json` is used, which can apply environment variables and command-line arguments to the test executable.
+
+- **`--no-launch-profile-arguments`**
+
+ Don't use arguments specified by `commandLineArgs` in launch profile to run the application.
+
+- **`--property:=`**
+
+ Sets one or more MSBuild properties. Specify multiple properties by repeating the option:
+
+ ```dotnetcli
+ --property:= --property:=
+ ```
+
+ The short form `-p` can be used for `--property`. The same applies for `/property:property=value` and its short form is `/p`.
+ More information about the available arguments can be found in [the dotnet msbuild documentation](dotnet-msbuild.md).
+
+- [!INCLUDE [help](includes/cli-help.md)]
+
+- **`args`**
+
+ Specifies extra arguments to pass to the test application(s). Use a space to separate multiple arguments. For more information and examples on what to pass, see [Microsoft.Testing.Platform overview](../testing/microsoft-testing-platform-intro.md) and [Microsoft.Testing.Platform extensions](../testing/microsoft-testing-platform-extensions.md).
+
+ > [!TIP]
+ > To specify extra arguments for specific projects, use the `TestingPlatformCommandLineArguments` MSBuild property.
+
+> [!NOTE]
+> To enable trace logging to a file, use the environment variable `DOTNET_CLI_TEST_TRACEFILE` to provide the path to the trace file.
+
+## Examples
+
+- Run the tests in the project or solution in the current directory:
+
+ ```dotnetcli
+ dotnet test
+ ```
+
+- Run the tests in the `TestProject` project:
+
+ ```dotnetcli
+ dotnet test --project ./TestProject/TestProject.csproj
+ ```
+
+- Run the tests in the `TestProjects` solution:
+
+ ```dotnetcli
+ dotnet test --solution ./TestProjects/TestProjects.sln
+ ```
+
+- Run the tests using `TestProject.dll` assembly:
+
+ ```dotnetcli
+ dotnet test --test-modules "**/bin/**/Debug/net10.0/TestProject.dll"
+ ```
+
+- Run the tests using `TestProject.dll` assembly with the root directory:
+
+ ```dotnetcli
+ dotnet test --test-modules "**/bin/**/Debug/net10.0/TestProject.dll" --root-directory "c:\code"
+ ```
+
+- Run the tests in the current directory with code coverage:
+
+ ```dotnetcli
+ dotnet test --coverage
+ ```
+
+- Run the tests in the `TestProject` project, providing the `-bl` (binary log) argument to `msbuild`:
+
+ ```dotnetcli
+ dotnet test --project ./TestProject/TestProject.csproj -bl
+ ```
+
+- Run the tests in the `TestProject` project, setting the MSBuild `DefineConstants` property to `DEV`:
+
+ ```dotnetcli
+ dotnet test --project ./TestProject/TestProject.csproj -p:DefineConstants="DEV"
+ ```
+
+## See also
+
+- [Frameworks and Targets](../../standard/frameworks.md)
+- [.NET Runtime Identifier (RID) catalog](../rid-catalog.md)
+- [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md)
+- [Microsoft.Testing.Platform extensions](../testing/microsoft-testing-platform-extensions.md)
+- [dotnet test](dotnet-test.md)
+- [dotnet test with VSTest](dotnet-test-vstest.md)
diff --git a/docs/core/tools/dotnet-test-vstest.md b/docs/core/tools/dotnet-test-vstest.md
new file mode 100644
index 0000000000000..c020fef555e73
--- /dev/null
+++ b/docs/core/tools/dotnet-test-vstest.md
@@ -0,0 +1,393 @@
+---
+title: dotnet test command with VSTest
+description: The dotnet test command is used to execute unit tests in a given project using VSTest.
+ms.date: 12/29/2024
+ai-usage: ai-assisted
+---
+# dotnet test with VSTest
+
+**This article applies to:** ✔️ .NET 6 SDK and later versions
+
+## Name
+
+`dotnet test` - .NET test driver used to execute unit tests with VSTest.
+
+## Synopsis
+
+```dotnetcli
+dotnet test [ | | | | ]
+ [--test-adapter-path ]
+ [-a|--arch ]
+ [--artifacts-path ]
+ [--blame]
+ [--blame-crash]
+ [--blame-crash-dump-type ]
+ [--blame-crash-collect-always]
+ [--blame-hang]
+ [--blame-hang-dump-type ]
+ [--blame-hang-timeout ]
+ [-c|--configuration ]
+ [--collect ]
+ [-d|--diag ]
+ [--disable-build-servers]
+ [-f|--framework ]
+ [-e|--environment ]
+ [--filter ]
+ [--interactive]
+ [-l|--logger ]
+ [--no-build]
+ [--nologo]
+ [--no-restore]
+ [-o|--output ]
+ [--os ]
+ [--results-directory ]
+ [-r|--runtime ]
+ [-s|--settings ]
+ [-t|--list-tests]
+ [--tl:[auto|on|off]]
+ [-v|--verbosity ]
+ [...]
+ [[--] ]
+
+dotnet test -h|--help
+```
+
+## Description
+
+The `dotnet test` command is used to execute unit tests in a given solution. The `dotnet test` command builds the solution and runs a test host application for each test project in the solution using `VSTest`. The test host executes tests in the given project using a test framework, for example: MSTest, NUnit, or xUnit, and reports the success or failure of each test. If all tests are successful, the test runner returns 0 as an exit code; otherwise if any test fails, it returns 1.
+
+> [!NOTE]
+> `dotnet test` was originally designed to support only `VSTest`-based test projects. Recent versions of the test frameworks are adding support for [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md). This alternative test platform is more lightweight and faster than `VSTest` and supports `dotnet test` with different command line options. For more information, see [dotnet test with MTP](dotnet-test-mtp.md).
+
+For multi-targeted projects, tests are run for each targeted framework. The test host and the unit test framework are packaged as NuGet packages and are restored as ordinary dependencies for the project. Starting with the .NET 9 SDK, these tests are run in parallel by default. To disable parallel execution, set the `TestTfmsInParallel` MSBuild property to `false`. For more information, see [Run tests in parallel](../whats-new/dotnet-9/sdk.md#run-tests-in-parallel) and the [example command line later in this article](#testtfmsinparallel).
+
+Test projects specify the test runner using an ordinary `` element, as seen in the following sample project file:
+
+[!code-xml[XUnit Basic Template](../../../samples/snippets/csharp/xunit-test/xunit-test.csproj)]
+
+Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework. And `xunit.runner.visualstudio` is a test adapter, which allows the xUnit framework to work with the test host.
+
+## Implicit restore
+
+[!INCLUDE[dotnet restore note](~/includes/dotnet-restore-note.md)]
+
+[!INCLUDE [cli-advertising-manifests](includes/cli-advertising-manifests.md)]
+
+## Arguments
+
+- **`PROJECT | SOLUTION | DIRECTORY | DLL | EXE`**
+
+ - Path to the test project.
+ - Path to the solution.
+ - Path to a directory that contains a project or a solution.
+ - Path to a test project *.dll* file.
+ - Path to a test project *.exe* file.
+
+ If not specified, the effect is the same as using the `DIRECTORY` argument to specify the current directory.
+
+## Options
+
+> [!WARNING]
+> Breaking changes in options:
+>
+> - Starting in .NET 7: switch `-a` to alias `--arch` instead of `--test-adapter-path`
+> - Starting in .NET 7: switch `-r` to alias `--runtime` instead of `--results-directory`
+
+- **`--test-adapter-path `**
+
+ Path to a directory to be searched for additional test adapters. Only *.dll* files with suffix `.TestAdapter.dll` are inspected. If not specified, the directory of the test *.dll* is searched.
+
+ Short form `-a` available in .NET SDK versions earlier than 7.
+
+- [!INCLUDE [arch](includes/cli-arch.md)]
+
+- [!INCLUDE [artifacts-path](includes/cli-artifacts-path.md)]
+
+- **`--blame`**
+
+ Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash.
+
+ This option doesn't create a memory dump and isn't helpful when the test is hanging.
+
+- **`--blame-crash`** (Available since .NET 5.0 SDK)
+
+ Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version of .NET used, the type of error, and the operating system.
+
+ For exceptions in managed code, a dump will be automatically collected on .NET 5.0 and later versions. It will generate a dump for testhost or any child process that also ran on .NET 5.0 and crashed. Crashes in native code will not generate a dump. This option works on Windows, macOS, and Linux.
+
+ Crash dumps in native code, or when using .NET Core 3.1 or earlier versions, can only be collected on Windows, by using Procdump. A directory that contains *procdump.exe* and *procdump64.exe* must be in the PATH or PROCDUMP_PATH environment variable. [Download the tools](/sysinternals/downloads/procdump). Implies `--blame`.
+
+ To collect a crash dump from a native application running on .NET 5.0 or later, the usage of Procdump can be forced by setting the `VSTEST_DUMP_FORCEPROCDUMP` environment variable to `1`.
+
+- **`--blame-crash-dump-type `** (Available since .NET 5.0 SDK)
+
+ The type of crash dump to be collected. Supported dump types are `full` (default), and `mini`. Implies `--blame-crash`.
+
+- **`--blame-crash-collect-always`** (Available since .NET 5.0 SDK)
+
+ Collects a crash dump on expected as well as unexpected test host exit.
+
+- **`--blame-hang`** (Available since .NET 5.0 SDK)
+
+ Run the tests in blame mode and collects a hang dump when a test exceeds the given timeout.
+
+- **`--blame-hang-dump-type `** (Available since .NET 5.0 SDK)
+
+ The type of crash dump to be collected. It should be `full`, `mini`, or `none`. When `none` is specified, test host is terminated on timeout, but no dump is collected. Implies `--blame-hang`.
+
+- **`--blame-hang-timeout `** (Available since .NET 5.0 SDK)
+
+ Per-test timeout, after which a hang dump is triggered and the test host process and all of its child processes are dumped and terminated. The timeout value is specified in one of the following formats:
+
+ - 1.5h, 1.5hour, 1.5hours
+ - 90m, 90min, 90minute, 90minutes
+ - 5400s, 5400sec, 5400second, 5400seconds
+ - 5400000ms, 5400000mil, 5400000millisecond, 5400000milliseconds
+
+ When no unit is used (for example, 5400000), the value is assumed to be in milliseconds. When used together with data driven tests, the timeout behavior depends on the test adapter used. For xUnit, NUnit, and MSTest 2.2.4+, the timeout is renewed after every test case. For MSTest before version 2.2.4, the timeout is used for all test cases. This option is supported on Windows with `netcoreapp2.1` and later, on Linux with `netcoreapp3.1` and later, and on macOS with `net5.0` or later. Implies `--blame` and `--blame-hang`.
+
+- [!INCLUDE [configuration](includes/cli-configuration.md)]
+
+- **`--collect `**
+
+ Enables data collector for the test run. For more information, see [Monitor and analyze test run](https://aka.ms/vstest-collect).
+
+ For example you can collect code coverage by using the `--collect "Code Coverage"` option. For more information, see [Use code coverage](/visualstudio/test/using-code-coverage-to-determine-how-much-code-is-being-tested), [Customize code coverage analysis](/visualstudio/test/customizing-code-coverage-analysis), and [GitHub issue dotnet/docs#34479](https://github.com/dotnet/docs/issues/34479).
+
+ To collect code coverage you can also use [Coverlet](https://github.com/coverlet-coverage/coverlet/blob/master/README.md) by using the `--collect "XPlat Code Coverage"` option.
+
+- **`-d|--diag `**
+
+ Enables diagnostic mode for the test platform and writes diagnostic messages to the specified file and to files next to it. The process that is logging the messages determines which files are created, such as `*.host_.txt` for test host log, and `*.datacollector_.txt` for data collector log.
+
+- [!INCLUDE [disable-build-servers](includes/cli-disable-build-servers.md)]
+
+- **`-e|--environment `**
+
+ Sets the value of an environment variable. Creates the variable if it doesn't exist, overrides if it does exist. Use of this option will force the tests to be run in an isolated process. The option can be specified multiple times to provide multiple variables.
+
+- **`-f|--framework `**
+
+ The [target framework moniker (TFM)](../../standard/frameworks.md) of the target framework to run tests for. The target framework must also be specified in the project file.
+
+- **`--filter `**
+
+ Filters tests in the current project using the given expression. Only tests that match the filter expression are run. For more information, see the [Filter option details](#filter-option-details) section. For more information and examples on how to use selective unit test filtering, see [Running selective unit tests](../testing/selective-unit-tests.md).
+
+- [!INCLUDE [help](includes/cli-help.md)]
+
+- [!INCLUDE [interactive](includes/cli-interactive.md)]
+
+- **`-l|--logger `**
+
+ Specifies a logger for test results and optionally switches for the logger. Specify this parameter multiple times to enable multiple loggers. For more information, see [Reporting test results](https://github.com/microsoft/vstest/blob/main/docs/report.md#available-test-loggers), [Switches for loggers](/visualstudio/msbuild/msbuild-command-line-reference#switches-for-loggers), and the [examples](#examples) later in this article.
+
+ In order to pass command-line switches to the logger:
+
+ * Use the full name of the switch, not the abbreviated form (for example, `verbosity` instead of `v`).
+ * Omit any leading dashes.
+ * Replace the space separating each switch with a semicolon `;`.
+ * If the switch has a value, replace the colon separator between that switch and its value with the equals sign `=`.
+
+ For example, `-v:detailed --consoleLoggerParameters:ErrorsOnly` would become `verbosity=detailed;consoleLoggerParameters=ErrorsOnly`.
+
+- **`--no-build`**
+
+ Doesn't build the test project before running it. It also implicitly sets the `--no-restore` flag.
+
+- **`--nologo`**
+
+ Run tests without displaying the Microsoft TestPlatform banner. Available since .NET Core 3.0 SDK.
+
+- **`--no-restore`**
+
+ Doesn't execute an implicit restore when running the command.
+
+- **`-o|--output `**
+
+ Directory in which to find the binaries to run. If not specified, the default path is `./bin///`. For projects with multiple target frameworks (via the `TargetFrameworks` property), you also need to define `--framework` when you specify this option. `dotnet test` always runs tests from the output directory. You can use to consume test assets in the output directory.
+
+ - .NET 7.0.200 SDK and later
+
+ If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md).
+
+- [!INCLUDE [os](includes/cli-os.md)]
+
+- **`--results-directory `**
+
+ 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 project file.
+
+ Short form `-r` available in .NET SDK versions earlier than 7.
+
+- **`-r|--runtime `**
+
+ The target runtime to test for.
+
+ Short form `-r` available starting in .NET SDK 7.
+
+- **`-s|--settings `**
+
+ The `.runsettings` file to use for running the tests. The `TargetPlatform` element (x86|x64) has no effect for `dotnet test`. To run tests that target x86, install the x86 version of .NET Core. The bitness of the *dotnet.exe* that is on the path is what will be used for running tests. For more information, see the following resources:
+
+ - [Configure unit tests by using a `.runsettings` file.](/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file)
+ - [Configure a test run](https://github.com/microsoft/vstest/blob/main/docs/configure.md)
+
+- **`-t|--list-tests`**
+
+ List the discovered tests instead of running the tests.
+
+- [!INCLUDE [tl](includes/cli-tl.md)]
+
+- [!INCLUDE [verbosity](includes/cli-verbosity-minimal.md)]
+
+- **`args`**
+
+ Specifies extra arguments to pass to the adapter. Use a space to separate multiple arguments.
+
+ The list of possible arguments depends upon the specified behavior:
+ - When you specify a project, solution, or a directory, or if you omit this argument, the call is forwarded to `msbuild`. In that case, the available arguments can be found in [the dotnet msbuild documentation](dotnet-msbuild.md).
+ - When you specify a *.dll* or an *.exe*, the call is forwarded to `vstest`. In that case, the available arguments can be found in [the dotnet vstest documentation](dotnet-vstest.md).
+
+- **`RunSettings`** arguments
+
+ Inline `RunSettings` are passed as the last arguments on the command line after "-- " (note the space after --). Inline `RunSettings` are specified as `[name]=[value]` pairs. A space is used to separate multiple `[name]=[value]` pairs.
+
+ Example: `dotnet test -- MSTest.DeploymentEnabled=false MSTest.MapInconclusiveToFailed=True`
+
+ For more information, see [Passing RunSettings arguments through command line](https://github.com/Microsoft/vstest-docs/blob/main/docs/RunSettingsArguments.md).
+
+## Examples
+
+- Run the tests in the project in the current directory:
+
+ ```dotnetcli
+ dotnet test
+ ```
+
+- Run the tests in the `test1` project:
+
+ ```dotnetcli
+ dotnet test ~/projects/test1/test1.csproj
+ ```
+
+- Run the tests using `test1.dll` assembly:
+
+ ```dotnetcli
+ dotnet test ~/projects/test1/bin/debug/test1.dll
+ ```
+
+- Run the tests in the project in the current directory, and generate a test results file in the trx format:
+
+ ```dotnetcli
+ dotnet test --logger trx
+ ```
+
+- Run the tests in the project in the current directory, and generate a code coverage file using [Microsoft Code Coverage](https://github.com/microsoft/codecoverage/blob/main/README.md):
+
+ ```dotnetcli
+ dotnet test --collect "Code Coverage"
+ ```
+
+- Run the tests in the project in the current directory, and generate a code coverage file using [Coverlet](https://github.com/coverlet-coverage/coverlet/blob/master/README.md) (after installing [Coverlet](https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md) collectors integration):
+
+ ```dotnetcli
+ dotnet test --collect:"XPlat Code Coverage"
+ ```
+
+- Run the tests in the project in the current directory, and log with detailed verbosity to the console:
+
+ ```dotnetcli
+ dotnet test --logger "console;verbosity=detailed"
+ ```
+
+- Run the tests in the project in the current directory, and log with the trx logger to *testResults.trx* in the *TestResults* folder:
+
+ ```dotnetcli
+ dotnet test --logger "trx;logfilename=testResults.trx"
+ ```
+
+ Since the log file name is specified, the same name is used for each target framework in the case of a multi-targeted project. The output for each target framework overwrites the output for preceding target frameworks. The file is created in the *TestResults* folder in the test project folder, because relative paths are relative to that folder. The following example shows how to produce a separate file for each target framework.
+
+- Run the tests in the project in the current directory, and log with the trx logger to files in the *TestResults* folder, with file names that are unique for each target framework:
+
+ ```dotnetcli
+ dotnet test --logger:"trx;LogFilePrefix=testResults"
+ ```
+
+- Run the tests in the project in the current directory, and log with the html logger to *testResults.html* in the *TestResults* folder:
+
+ ```dotnetcli
+ dotnet test --logger "html;logfilename=testResults.html"
+ ```
+
+- Run the tests in the project in the current directory, and report tests that were in progress when the test host crashed:
+
+ ```dotnetcli
+ dotnet test --blame
+ ```
+
+- Run the tests in the `test1` project, providing the `-bl` (binary log) argument to `msbuild`:
+
+ ```dotnetcli
+ dotnet test ~/projects/test1/test1.csproj -bl
+ ```
+
+- Run the tests in the `test1` project, setting the MSBuild `DefineConstants` property to `DEV`:
+
+ ```dotnetcli
+ dotnet test ~/projects/test1/test1.csproj -p:DefineConstants="DEV"
+ ```
+
+
+
+- Run the tests in the `test1` project, setting the MSBuild `TestTfmsInParallel` property to `false`:
+
+ ```dotnetcli
+ dotnet test ~/projects/test1/test1.csproj -p:TestTfmsInParallel=false
+ ```
+
+## Filter option details
+
+`--filter `
+
+`` has the format `[|&]`.
+
+`` is an attribute of the `Test Case`. The following are the properties supported by popular unit test frameworks:
+
+| Test Framework | Supported properties |
+| -------------- | --------------------------------------------------------------------------------------------------------- |
+| MSTest | - FullyQualifiedName
- Name
- ClassName
- Priority
- TestCategory
|
+| xUnit | - FullyQualifiedName
- DisplayName
- Category
|
+| NUnit | - FullyQualifiedName
- Name
- Category
- Priority
|
+
+The `` describes the relationship between the property and the value:
+
+| Operator | Function |
+| :------: | --------------- |
+| `=` | Exact match |
+| `!=` | Not exact match |
+| `~` | Contains |
+| `!~` | Not contains |
+
+`` is a string. All the lookups are case insensitive.
+
+An expression without an `` is automatically considered as a `contains` on `FullyQualifiedName` property (for example, `dotnet test --filter xyz` is same as `dotnet test --filter FullyQualifiedName~xyz`).
+
+Expressions can be joined with conditional operators:
+
+| Operator | Function |
+| ------------------- | -------- |
+| | | OR |
+| `&` | AND |
+
+You can enclose expressions in parenthesis when using conditional operators (for example, `(Name~TestMethod1) | (Name~TestMethod2)`).
+
+For more information and examples on how to use selective unit test filtering, see [Running selective unit tests](../testing/selective-unit-tests.md).
+
+## See also
+
+- [Frameworks and Targets](../../standard/frameworks.md)
+- [.NET Runtime Identifier (RID) catalog](../rid-catalog.md)
+- [Passing runsettings arguments through commandline](https://github.com/microsoft/vstest/blob/main/docs/RunSettingsArguments.md)
+- [dotnet test](dotnet-test.md)
+- [dotnet test with MTP](dotnet-test-mtp.md)
diff --git a/docs/core/tools/dotnet-test.md b/docs/core/tools/dotnet-test.md
index b3b4c1c307123..066fac4030864 100644
--- a/docs/core/tools/dotnet-test.md
+++ b/docs/core/tools/dotnet-test.md
@@ -1,7 +1,8 @@
---
title: dotnet test command
description: The dotnet test command is used to execute unit tests in a given project.
-ms.date: 09/29/2025
+ms.date: 12/29/2024
+ai-usage: ai-assisted
---
# dotnet test
@@ -13,610 +14,50 @@ ms.date: 09/29/2025
## Description
-The `dotnet test` command builds the solution and runs the tests with either VSTest or Microsoft Testing Platform (MTP). To enable MTP, you need to specify the test runner in the `global.json` file.
+The `dotnet test` command builds the solution and runs the tests with either VSTest or Microsoft Testing Platform (MTP). The test runner you use determines the available command-line options and behavior.
-Some examples of how to specify the test runner in the [`global.json`](global-json.md) file:
+### Choosing a test runner
- ```json
- {
- "test": {
- "runner": "Microsoft.Testing.Platform"
- }
- }
- ```
+To enable MTP, you need to specify the test runner in the [`global.json`](global-json.md) file. Here are examples of how to configure the test runner:
- ```json
- {
- "test": {
- "runner": "VSTest"
- }
- }
- ```
+**Microsoft Testing Platform:**
-> [!IMPORTANT]
-> The `dotnet test` experience for MTP is only supported in `Microsoft.Testing.Platform` version 1.7 and later.
-
-> [!TIP]
-> For conceptual documentation about `dotnet test`, see [Testing with dotnet test](../testing/unit-testing-with-dotnet-test.md).
-
-## VSTest and Microsoft.Testing.Platform (MTP)
-
-### [dotnet test with VSTest](#tab/dotnet-test-with-vstest)
-
-#### Synopsis
-
-```dotnetcli
-dotnet test [ | | | | ]
- [--test-adapter-path ]
- [-a|--arch ]
- [--artifacts-path ]
- [--blame]
- [--blame-crash]
- [--blame-crash-dump-type ]
- [--blame-crash-collect-always]
- [--blame-hang]
- [--blame-hang-dump-type ]
- [--blame-hang-timeout ]
- [-c|--configuration ]
- [--collect ]
- [-d|--diag ]
- [--disable-build-servers]
- [-f|--framework ]
- [-e|--environment ]
- [--filter ]
- [--interactive]
- [-l|--logger ]
- [--no-build]
- [--nologo]
- [--no-restore]
- [-o|--output ]
- [--os ]
- [--results-directory ]
- [-r|--runtime ]
- [-s|--settings ]
- [-t|--list-tests]
- [--tl:[auto|on|off]]
- [-v|--verbosity ]
- [...]
- [[--] ]
-
-dotnet test -h|--help
+```json
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
```
-#### Description
-
-The `dotnet test` command is used to execute unit tests in a given solution. The `dotnet test` command builds the solution and runs a test host application for each test project in the solution using `VSTest`. The test host executes tests in the given project using a test framework, for example: MSTest, NUnit, or xUnit, and reports the success or failure of each test. If all tests are successful, the test runner returns 0 as an exit code; otherwise if any test fails, it returns 1.
-
-> [!NOTE]
-> `dotnet test` was originally designed to support only `VSTest`-based test projects. Recent versions of the test frameworks are adding support for [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md). This alternative test platform is more lightweight and faster than `VSTest` and supports `dotnet test` with different command line options. For more information, see [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md).
-
-For multi-targeted projects, tests are run for each targeted framework. The test host and the unit test framework are packaged as NuGet packages and are restored as ordinary dependencies for the project. Starting with the .NET 9 SDK, these tests are run in parallel by default. To disable parallel execution, set the `TestTfmsInParallel` MSBuild property to `false`. For more information, see [Run tests in parallel](../whats-new/dotnet-9/sdk.md#run-tests-in-parallel) and the [example command line later in this article](#testtfmsinparallel).
-
-Test projects specify the test runner using an ordinary `` element, as seen in the following sample project file:
-
-[!code-xml[XUnit Basic Template](../../../samples/snippets/csharp/xunit-test/xunit-test.csproj)]
-
-Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework. And `xunit.runner.visualstudio` is a test adapter, which allows the xUnit framework to work with the test host.
-
-#### Implicit restore
-
-[!INCLUDE[dotnet restore note](~/includes/dotnet-restore-note.md)]
-
-[!INCLUDE [cli-advertising-manifests](includes/cli-advertising-manifests.md)]
-
-#### Arguments
-
-- **`PROJECT | SOLUTION | DIRECTORY | DLL | EXE`**
-
- - Path to the test project.
- - Path to the solution.
- - Path to a directory that contains a project or a solution.
- - Path to a test project *.dll* file.
- - Path to a test project *.exe* file.
-
- If not specified, the effect is the same as using the `DIRECTORY` argument to specify the current directory.
-
-#### Options
-
-> [!WARNING]
-> Breaking changes in options:
->
-> - Starting in .NET 7: switch `-a` to alias `--arch` instead of `--test-adapter-path`
-> - Starting in .NET 7: switch `-r` to alias `--runtime` instead of `--results-directory`
-
-> [!WARNING]
-> When using `Microsoft.Testing.Platform`, please refer to [dotnet test integration](../testing/microsoft-testing-platform-integration-dotnet-test.md) for the supported options. As a rule of thumbs, every option non-related to testing is supported while every testing-related option is not supported as-is.
-
-- **`--test-adapter-path `**
-
- Path to a directory to be searched for additional test adapters. Only *.dll* files with suffix `.TestAdapter.dll` are inspected. If not specified, the directory of the test *.dll* is searched.
-
- Short form `-a` available in .NET SDK versions earlier than 7.
-
-- [!INCLUDE [arch](includes/cli-arch.md)]
-
-- [!INCLUDE [artifacts-path](includes/cli-artifacts-path.md)]
-
-- **`--blame`**
-
- Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in `TestResults//_Sequence.xml` that captures the order of tests that were run before the crash.
-
- This option does not create a memory dump and is not helpful when the test is hanging.
-
-- **`--blame-crash`** (Available since .NET 5.0 SDK)
-
- Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version of .NET used, the type of error, and the operating system.
-
- For exceptions in managed code, a dump will be automatically collected on .NET 5.0 and later versions. It will generate a dump for testhost or any child process that also ran on .NET 5.0 and crashed. Crashes in native code will not generate a dump. This option works on Windows, macOS, and Linux.
-
- Crash dumps in native code, or when using .NET Core 3.1 or earlier versions, can only be collected on Windows, by using Procdump. A directory that contains *procdump.exe* and *procdump64.exe* must be in the PATH or PROCDUMP_PATH environment variable. [Download the tools](/sysinternals/downloads/procdump). Implies `--blame`.
-
- To collect a crash dump from a native application running on .NET 5.0 or later, the usage of Procdump can be forced by setting the `VSTEST_DUMP_FORCEPROCDUMP` environment variable to `1`.
-
-- **`--blame-crash-dump-type `** (Available since .NET 5.0 SDK)
-
- The type of crash dump to be collected. Supported dump types are `full` (default), and `mini`. Implies `--blame-crash`.
-
-- **`--blame-crash-collect-always`** (Available since .NET 5.0 SDK)
-
- Collects a crash dump on expected as well as unexpected test host exit.
-
-- **`--blame-hang`** (Available since .NET 5.0 SDK)
-
- Run the tests in blame mode and collects a hang dump when a test exceeds the given timeout.
-
-- **`--blame-hang-dump-type `** (Available since .NET 5.0 SDK)
-
- The type of crash dump to be collected. It should be `full`, `mini`, or `none`. When `none` is specified, test host is terminated on timeout, but no dump is collected. Implies `--blame-hang`.
-
-- **`--blame-hang-timeout `** (Available since .NET 5.0 SDK)
-
- Per-test timeout, after which a hang dump is triggered and the test host process and all of its child processes are dumped and terminated. The timeout value is specified in one of the following formats:
-
- - 1.5h, 1.5hour, 1.5hours
- - 90m, 90min, 90minute, 90minutes
- - 5400s, 5400sec, 5400second, 5400seconds
- - 5400000ms, 5400000mil, 5400000millisecond, 5400000milliseconds
-
- When no unit is used (for example, 5400000), the value is assumed to be in milliseconds. When used together with data driven tests, the timeout behavior depends on the test adapter used. For xUnit, NUnit. and MSTest 2.2.4+, the timeout is renewed after every test case. For MSTest before version 2.2.4, the timeout is used for all test cases. This option is supported on Windows with `netcoreapp2.1` and later, on Linux with `netcoreapp3.1` and later, and on macOS with `net5.0` or later. Implies `--blame` and `--blame-hang`.
-
-- [!INCLUDE [configuration](includes/cli-configuration.md)]
-
-- **`--collect `**
-
- Enables data collector for the test run. For more information, see [Monitor and analyze test run](https://aka.ms/vstest-collect).
-
- For example you can collect code coverage by using the `--collect "Code Coverage"` option. For more information, see [Use code coverage](/visualstudio/test/using-code-coverage-to-determine-how-much-code-is-being-tested), [Customize code coverage analysis](/visualstudio/test/customizing-code-coverage-analysis), and [GitHub issue dotnet/docs#34479](https://github.com/dotnet/docs/issues/34479).
-
- To collect code coverage you can also use [Coverlet](https://github.com/coverlet-coverage/coverlet/blob/master/README.md) by using the `--collect "XPlat Code Coverage"` option.
-
-- **`-d|--diag `**
-
- Enables diagnostic mode for the test platform and writes diagnostic messages to the specified file and to files next to it. The process that is logging the messages determines which files are created, such as `*.host_.txt` for test host log, and `*.datacollector_.txt` for data collector log.
-
-- [!INCLUDE [disable-build-servers](includes/cli-disable-build-servers.md)]
-
-- **`-e|--environment `**
-
- Sets the value of an environment variable. Creates the variable if it does not exist, overrides if it does exist. Use of this option will force the tests to be run in an isolated process. The option can be specified multiple times to provide multiple variables.
-
-- **`-f|--framework `**
-
- The [target framework moniker (TFM)](../../standard/frameworks.md) of the target framework to run tests for. The target framework must also be specified in the project file.
-
-- **`--filter `**
-
- Filters tests in the current project using the given expression. Only tests that match the filter expression are run. For more information, see the [Filter option details](#filter-option-details) section. For more information and examples on how to use selective unit test filtering, see [Running selective unit tests](../testing/selective-unit-tests.md).
-
-- [!INCLUDE [help](includes/cli-help.md)]
-
-- [!INCLUDE [interactive](includes/cli-interactive.md)]
-
-- **`-l|--logger `**
-
- Specifies a logger for test results and optionally switches for the logger. Specify this parameter multiple times to enable multiple loggers. For more information, see [Reporting test results](https://github.com/microsoft/vstest/blob/main/docs/report.md#available-test-loggers), [Switches for loggers](/visualstudio/msbuild/msbuild-command-line-reference#switches-for-loggers), and the [examples](#examples) later in this article.
-
- In order to pass command-line switches to the logger:
-
- * Use the full name of the switch, not the abbreviated form (for example, `verbosity` instead of `v`).
- * Omit any leading dashes.
- * Replace the space separating each switch with a semicolon `;`.
- * If the switch has a value, replace the colon separator between that switch and its value with the equals sign `=`.
-
- For example, `-v:detailed --consoleLoggerParameters:ErrorsOnly` would become `verbosity=detailed;consoleLoggerParameters=ErrorsOnly`.
-
-- **`--no-build`**
-
- Doesn't build the test project before running it. It also implicitly sets the `--no-restore` flag.
-
-- **`--nologo`**
-
- Run tests without displaying the Microsoft TestPlatform banner. Available since .NET Core 3.0 SDK.
-
-- **`--no-restore`**
-
- Doesn't execute an implicit restore when running the command.
-
-- **`-o|--output `**
-
- Directory in which to find the binaries to run. If not specified, the default path is `./bin///`. For projects with multiple target frameworks (via the `TargetFrameworks` property), you also need to define `--framework` when you specify this option. `dotnet test` always runs tests from the output directory. You can use to consume test assets in the output directory.
-
- - .NET 7.0.200 SDK and later
-
- If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md).
-
-- [!INCLUDE [os](includes/cli-os.md)]
-
-- **`--results-directory `**
-
- 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 project file.
-
- Short form `-r` available in .NET SDK versions earlier than 7.
-
-- **`-r|--runtime `**
-
- The target runtime to test for.
-
- Short form `-r` available starting in .NET SDK 7.
-
-- **`-s|--settings `**
-
- The `.runsettings` file to use for running the tests. The `TargetPlatform` element (x86|x64) has no effect for `dotnet test`. To run tests that target x86, install the x86 version of .NET Core. The bitness of the *dotnet.exe* that is on the path is what will be used for running tests. For more information, see the following resources:
-
- - [Configure unit tests by using a `.runsettings` file.](/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file)
- - [Configure a test run](https://github.com/microsoft/vstest/blob/main/docs/configure.md)
-
-- **`-t|--list-tests`**
-
- List the discovered tests instead of running the tests.
-
-- [!INCLUDE [tl](includes/cli-tl.md)]
-
-- [!INCLUDE [verbosity](includes/cli-verbosity-minimal.md)]
-
-- **`args`**
-
- Specifies extra arguments to pass to the adapter. Use a space to separate multiple arguments.
-
- The list of possible arguments depends upon the specified behavior:
- - When you specify a project, solution, or a directory, or if you omit this argument, the call is forwarded to `msbuild`. In that case, the available arguments can be found in [the dotnet msbuild documentation](dotnet-msbuild.md).
- - When you specify a *.dll* or an *.exe*, the call is forwarded to `vstest`. In that case, the available arguments can be found in [the dotnet vstest documentation](dotnet-vstest.md).
-
-- **`RunSettings`** arguments
-
- Inline `RunSettings` are passed as the last arguments on the command line after "-- " (note the space after --). Inline `RunSettings` are specified as `[name]=[value]` pairs. A space is used to separate multiple `[name]=[value]` pairs.
-
- Example: `dotnet test -- MSTest.DeploymentEnabled=false MSTest.MapInconclusiveToFailed=True`
-
- For more information, see [Passing RunSettings arguments through command line](https://github.com/Microsoft/vstest-docs/blob/main/docs/RunSettingsArguments.md).
-
-#### Examples
-
-- Run the tests in the project in the current directory:
-
- ```dotnetcli
- dotnet test
- ```
-
-- Run the tests in the `test1` project:
-
- ```dotnetcli
- dotnet test ~/projects/test1/test1.csproj
- ```
-
-- Run the tests using `test1.dll` assembly:
-
- ```dotnetcli
- dotnet test ~/projects/test1/bin/debug/test1.dll
- ```
+**VSTest:**
-- Run the tests in the project in the current directory, and generate a test results file in the trx format:
-
- ```dotnetcli
- dotnet test --logger trx
- ```
-
-- Run the tests in the project in the current directory, and generate a code coverage file using [Microsoft Code Coverage](https://github.com/microsoft/codecoverage/blob/main/README.md):
-
- ```dotnetcli
- dotnet test --collect "Code Coverage"
- ```
-
-- Run the tests in the project in the current directory, and generate a code coverage file using [Coverlet](https://github.com/coverlet-coverage/coverlet/blob/master/README.md) (after installing [Coverlet](https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md) collectors integration):
-
- ```dotnetcli
- dotnet test --collect:"XPlat Code Coverage"
- ```
-
-- Run the tests in the project in the current directory, and log with detailed verbosity to the console:
-
- ```dotnetcli
- dotnet test --logger "console;verbosity=detailed"
- ```
-
-- Run the tests in the project in the current directory, and log with the trx logger to *testResults.trx* in the *TestResults* folder:
-
- ```dotnetcli
- dotnet test --logger "trx;logfilename=testResults.trx"
- ```
-
- Since the log file name is specified, the same name is used for each target framework in the case of a multi-targeted project. The output for each target framework overwrites the output for preceding target frameworks. The file is created in the *TestResults* folder in the test project folder, because relative paths are relative to that folder. The following example shows how to produce a separate file for each target framework.
-
-- Run the tests in the project in the current directory, and log with the trx logger to files in the *TestResults* folder, with file names that are unique for each target framework:
-
- ```dotnetcli
- dotnet test --logger:"trx;LogFilePrefix=testResults"
- ```
-
-- Run the tests in the project in the current directory, and log with the html logger to *testResults.html* in the *TestResults* folder:
-
- ```dotnetcli
- dotnet test --logger "html;logfilename=testResults.html"
- ```
-
-- Run the tests in the project in the current directory, and report tests that were in progress when the test host crashed:
-
- ```dotnetcli
- dotnet test --blame
- ```
-
-- Run the tests in the `test1` project, providing the `-bl` (binary log) argument to `msbuild`:
-
- ```dotnetcli
- dotnet test ~/projects/test1/test1.csproj -bl
- ```
-
-- Run the tests in the `test1` project, setting the MSBuild `DefineConstants` property to `DEV`:
-
- ```dotnetcli
- dotnet test ~/projects/test1/test1.csproj -p:DefineConstants="DEV"
- ```
-
-
-
-- Run the tests in the `test1` project, setting the MSBuild `TestTfmsInParallel` property to `false`:
-
- ```dotnetcli
- dotnet test ~/projects/test1/test1.csproj -p:TestTfmsInParallel=false
- ```
-
-#### Filter option details
-
-`--filter `
-
-`` has the format `[|&]`.
-
-`` is an attribute of the `Test Case`. The following are the properties supported by popular unit test frameworks:
-
-| Test Framework | Supported properties |
-| -------------- | --------------------------------------------------------------------------------------------------------- |
-| MSTest | - FullyQualifiedName
- Name
- ClassName
- Priority
- TestCategory
|
-| xUnit | - FullyQualifiedName
- DisplayName
- Category
|
-| NUnit | - FullyQualifiedName
- Name
- Category
- Priority
|
-
-The `` describes the relationship between the property and the value:
-
-| Operator | Function |
-| :------: | --------------- |
-| `=` | Exact match |
-| `!=` | Not exact match |
-| `~` | Contains |
-| `!~` | Not contains |
-
-`` is a string. All the lookups are case insensitive.
-
-An expression without an `` is automatically considered as a `contains` on `FullyQualifiedName` property (for example, `dotnet test --filter xyz` is same as `dotnet test --filter FullyQualifiedName~xyz`).
-
-Expressions can be joined with conditional operators:
-
-| Operator | Function |
-| ------------------- | -------- |
-| | | OR |
-| `&` | AND |
-
-You can enclose expressions in parenthesis when using conditional operators (for example, `(Name~TestMethod1) | (Name~TestMethod2)`).
-
-For more information and examples on how to use selective unit test filtering, see [Running selective unit tests](../testing/selective-unit-tests.md).
-
-#### See also
-
-- [Frameworks and Targets](../../standard/frameworks.md)
-- [.NET Runtime Identifier (RID) catalog](../rid-catalog.md)
-- [Passing runsettings arguments through commandline](https://github.com/microsoft/vstest/blob/main/docs/RunSettingsArguments.md)
-
-### [dotnet test with MTP](#tab/dotnet-test-with-mtp)
-
-**This article applies to:** ✔️ .NET 10 SDK and later versions
-
-#### Synopsis
-
-```dotnetcli
-dotnet test
- [--project ]
- [--solution ]
- [--test-modules ]
- [--root-directory ]
- [--max-parallel-test-modules ]
- [-a|--arch ]
- [-c|--configuration ]
- [-f|--framework ]
- [--os ]
- [-r|--runtime ]
- [-v|--verbosity ]
- [--no-build]
- [--no-restore]
- [--no-ansi]
- [--no-progress]
- [--output ]
- [--no-launch-profile]
- [--no-launch-profile-arguments]
- [...]
-
-dotnet test -h|--help
+```json
+{
+ "test": {
+ "runner": "VSTest"
+ }
+}
```
-#### Description
-
-With Microsoft Testing Platform, `dotnet test` operates faster than with VSTest. The test-related arguments are no longer fixed, as they are tied to the registered extensions in the test project(s). Moreover, MTP supports a globbing filter when running tests. For more information, see [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md).
-
-> [!WARNING]
-> When Microsoft.Testing.Platform is opted in via `global.json`, `dotnet test` expects all test projects to use Microsoft.Testing.Platform. It is an error if any of the test projects use VSTest.
-
-#### Implicit restore
-
-[!INCLUDE[dotnet restore note](~/includes/dotnet-restore-note.md)]
-
-#### Options
-
-> [!NOTE]
-> You can use only one of the following options at a time: `--project`, `--solution`, or `--test-modules`. These options can't be combined.
-> In addition, when using `--test-modules`, you can't specify `--arch`, `--configuration`, `--framework`, `--os`, or `--runtime`. These options are not relevant for an already-built module.
-
-- **`--project `**
-
- Specifies the path of the project file to run (folder name or full path). If not specified, it defaults to the current directory.
-
-- **`--solution `**
-
- Specifies the path of the solution file to run (folder name or full path). If not specified, it defaults to the current directory.
-
-- **`--test-modules `**
-
- Filters test modules using file globbing in .NET. Only tests belonging to those test modules will run. For more information and examples on how to use file globbing in .NET, see [File globbing](../../../docs/core/extensions/file-globbing.md).
-
-- **`--root-directory `**
-
- Specifies the root directory of the `--test-modules` option. It can only be used with the `--test-modules` option.
-
-- **`--max-parallel-test-modules `**
-
- Specifies the maximum number of test modules that can run in parallel. The default is .
-
-- [!INCLUDE [arch](includes/cli-arch.md)]
-
-- [!INCLUDE [configuration](includes/cli-configuration.md)]
-
-- **`-f|--framework `**
-
- The [target framework moniker (TFM)](../../standard/frameworks.md) of the target framework to run tests for. The target framework must also be specified in the project file.
-
-- [!INCLUDE [os](includes/cli-os.md)]
-
-- **`-r|--runtime `**
-
- The target runtime to test for.
-
- Short form `-r` available starting in .NET SDK 7.
-
- > [!NOTE]
- > Running tests for a solution with a global `RuntimeIdentifier` property (explicitly or via `--arch`, `--runtime`, or `--os`) is not supported. Set `RuntimeIdentifier` on an individual project level instead.
-
-- [!INCLUDE [verbosity](includes/cli-verbosity.md)]
-
-- **`--no-build`**
-
- Specifies that the test project isn't built before being run. It also implicitly sets the `--no-restore` flag.
-
-- **`--no-restore`**
-
- Specifies that an implicit restore isn't executed when running the command.
-
-- **`--no-ansi`**
-
- Disables outputting ANSI escape characters to screen.
-
-- **`--no-progress`**
-
- Disables reporting progress to screen.
-
-- **`--output `**
-
- Specifies the output verbosity when reporting tests. Valid values are `Normal` and `Detailed`. The default is `Normal`.
-
-- **`--no-launch-profile`**
-
- Do not attempt to use launchSettings.json to configure the application. By default, `launchSettings.json` is used, which can apply environment variables and command-line arguments to the test executable.
-
-- **`--no-launch-profile-arguments`**
-
- Do not use arguments specified by `commandLineArgs` in launch profile to run the application.
-
-- **`--property:=`**
-
- Sets one or more MSBuild properties. Specify multiple properties by repeating the option:
-
- ```dotnetcli
- --property:= --property:=
- ```
-
- The short form `-p` can be used for `--property`. The same applies for `/property:property=value` and its short form is `/p`.
- More informatiom about the available arguments can be found in [the dotnet msbuild documentation](dotnet-msbuild.md).
-
-- [!INCLUDE [help](includes/cli-help.md)]
-
-- **`args`**
-
- Specifies extra arguments to pass to the test application(s). Use a space to separate multiple arguments. For more information and examples on what to pass, see [Microsoft.Testing.Platform overview](../../../docs/core/testing/microsoft-testing-platform-intro.md) and [Microsoft.Testing.Platform extensions](../../../docs/core/testing/microsoft-testing-platform-extensions.md).
-
- > [!TIP]
- > To specify extra arguments for specific projects, use the `TestingPlatformCommandLineArguments` MSBuild property.
-
-> [!NOTE]
-> To enable trace logging to a file, use the environment variable `DOTNET_CLI_TEST_TRACEFILE` to provide the path to the trace file.
-
-#### Examples
-
-- Run the tests in the project or solution in the current directory:
-
- ```dotnetcli
- dotnet test
- ```
-
-- Run the tests in the `TestProject` project:
-
- ```dotnetcli
- dotnet test --project ./TestProject/TestProject.csproj
- ```
-
-- Run the tests in the `TestProjects` solution:
-
- ```dotnetcli
- dotnet test --solution ./TestProjects/TestProjects.sln
- ```
-
-- Run the tests using `TestProject.dll` assembly:
-
- ```dotnetcli
- dotnet test --test-modules "**/bin/**/Debug/net10.0/TestProject.dll"
- ```
-
-- Run the tests using `TestProject.dll` assembly with the root directory:
-
- ```dotnetcli
- dotnet test --test-modules "**/bin/**/Debug/net10.0/TestProject.dll" --root-directory "c:\code"
- ```
-
-- Run the tests in the current directory with code coverage:
+> [!IMPORTANT]
+> The `dotnet test` experience for MTP is only supported in `Microsoft.Testing.Platform` version 1.7 and later.
- ```dotnetcli
- dotnet test --coverage
- ```
+### Test runner documentation
-- Run the tests in the `TestProject` project, providing the `-bl` (binary log) argument to `msbuild`:
+The available command-line options, behavior, and capabilities differ depending on which test runner you use:
- ```dotnetcli
- dotnet test --project ./TestProject/TestProject.csproj -bl
- ```
+- **[dotnet test with VSTest](dotnet-test-vstest.md)** - The traditional test platform, available in .NET 6 SDK and later. Provides comprehensive test discovery, filtering, and result reporting capabilities.
-- Run the tests in the `TestProject` project, setting the MSBuild `DefineConstants` property to `DEV`:
+- **[dotnet test with MTP](dotnet-test-mtp.md)** - The modern testing platform, available in .NET 10 SDK and later. Offers faster test execution and more flexible test module selection.
- ```dotnetcli
- dotnet test --project ./TestProject/TestProject.csproj -p:DefineConstants="DEV"
- ```
+> [!TIP]
+> For conceptual documentation about `dotnet test`, see [Testing with dotnet test](../testing/unit-testing-with-dotnet-test.md).
-#### See also
+## See also
+- [Testing with dotnet test](../testing/unit-testing-with-dotnet-test.md)
+- [dotnet test with VSTest](dotnet-test-vstest.md)
+- [dotnet test with MTP](dotnet-test-mtp.md)
- [Frameworks and Targets](../../standard/frameworks.md)
- [.NET Runtime Identifier (RID) catalog](../rid-catalog.md)
-- [Microsoft.Testing.Platform](../../../docs/core/testing/microsoft-testing-platform-intro.md)
-- [Microsoft.Testing.Platform extensions](../../../docs/core/testing/microsoft-testing-platform-extensions.md)
diff --git a/docs/csharp/language-reference/compiler-messages/snippets/pattern-matching-warnings/Switch.cs b/docs/csharp/language-reference/compiler-messages/snippets/pattern-matching-warnings/Switch.cs
deleted file mode 100644
index 9a2f9b74c66fe..0000000000000
--- a/docs/csharp/language-reference/compiler-messages/snippets/pattern-matching-warnings/Switch.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-namespace firstExample
-{
-
- public class Switch
- {
- //
- // CS8509.cs
- enum EnumValues
- {
- Value1,
- Value2,
- Value3
- }
-
- void Method(EnumValues enumValues)
- {
- var result = enumValues switch
- {
- EnumValues.Value1 => 1,
- EnumValues.Value2 => 2,
- };
- }
- //
-
- public static void RedundantPattern()
- {
- object? o = null;
- //
- _ = o is not null or 42; // warning: pattern "42" is redundant
- _ = o is not int or string; // warning: pattern "string" is redundant
- //
- }
- }
-}
-
-namespace secondExample
-{
- public class Switch
- {
- //
- enum EnumValues
- {
- Value1,
- Value2,
- Value3
- }
-
- void Method(EnumValues enumValues)
- {
- var result = enumValues switch
- {
- EnumValues.Value1 => 1,
- EnumValues.Value2 => 2,
- EnumValues.Value3 => 3,
- _ => throw new ArgumentException("Input isn't a valid enum value", nameof(enumValues)),
- };
- }
- //
- }
-}
diff --git a/docs/csharp/language-reference/compiler-messages/snippets/pattern-matching-warnings/pattern-matching-warnings.csproj b/docs/csharp/language-reference/compiler-messages/snippets/pattern-matching-warnings/pattern-matching-warnings.csproj
deleted file mode 100644
index bdcda4a6bc812..0000000000000
--- a/docs/csharp/language-reference/compiler-messages/snippets/pattern-matching-warnings/pattern-matching-warnings.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- Library
- net8.0
- enable
- enable
- pattern_matching_warnings
-
-
-
diff --git a/docs/fundamentals/code-analysis/style-rules/ide0290.md b/docs/fundamentals/code-analysis/style-rules/ide0290.md
index 2ac705366d18d..ffde613497f3e 100644
--- a/docs/fundamentals/code-analysis/style-rules/ide0290.md
+++ b/docs/fundamentals/code-analysis/style-rules/ide0290.md
@@ -24,6 +24,8 @@ dev_langs:
This rule flags classes that can use a [primary constructor](../../../csharp/programming-guide/classes-and-structs/instance-constructors.md#primary-constructors) instead of a separate constructor definition. You define a primary constructor by placing any constructor parameters in parentheses following the type name. A primary constructor indicates that these parameters are necessary for any instance of the type.
+When you create a class or struct with multiple constructors, you gain flexibility, but you also add verbose syntax. You must cleanly separate the constructor input from the class state. With primary constructors, you can put one constructor's parameters in scope for the whole class or struct. You can use these parameters for initialization or directly as object state. However, if you add other constructors, they must call through the primary constructor.
+
## Options
Options specify the behavior that you want the rule to enforce. For information about configuring options, see [Option format](language-rules.md#option-format).
diff --git a/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md b/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md
index 513ca6358297f..8a022cc3be4c8 100644
--- a/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md
+++ b/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md
@@ -2,6 +2,6 @@ A simple way to collect traces and metrics in ASP.NET applications is to use [As
The default project templates for Aspire contain a `ServiceDefaults` project. Each service in the Aspire solution has a reference to the Service Defaults project. The services use it to set up and configure OTel.
-The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient, and Runtime Instrumentation packages. These instrumentation components are configured in the [Extensions.cs](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.5/Extensions.cs) file. To support telemetry visualization in Aspire Dashboard, the Service Defaults project also includes the OTLP exporter by default.
+The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient, and Runtime Instrumentation packages. These instrumentation components are configured in the [Extensions.cs](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/Extensions.cs) file. To support telemetry visualization in Aspire Dashboard, the Service Defaults project also includes the OTLP exporter by default.
Aspire Dashboard is designed to bring telemetry observation to the local debug cycle, which enables developers to ensure that the applications are producing telemetry. The telemetry visualization also helps to diagnose those applications locally. Being able to observe the calls between services is as useful at debug time as in production. The Aspire dashboard is launched automatically when you F5 the `AppHost` Project from Visual Studio or `dotnet run` the `AppHost` project from command line.
diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml
index f1e21b9ebbdba..b5944f1049c03 100644
--- a/docs/navigate/tools-diagnostics/toc.yml
+++ b/docs/navigate/tools-diagnostics/toc.yml
@@ -218,6 +218,11 @@ items:
href: ../../core/tools/dotnet-store.md
- name: dotnet test
href: ../../core/tools/dotnet-test.md
+ items:
+ - name: dotnet test with VSTest
+ href: ../../core/tools/dotnet-test-vstest.md
+ - name: dotnet test with MTP
+ href: ../../core/tools/dotnet-test-mtp.md
- name: dotnet tool
items:
- name: dotnet tool exec
@@ -364,9 +369,6 @@ items:
- name: WCF service XML serializer
displayName: dotnet-svcutil.xmlserializer
href: ../../core/additional-tools/dotnet-svcutil.xmlserializer-guide.md
- - name: XML serializer generator
- displayName: sgen,sgen.exe,Microsoft.XmlSerializer.Generator,XmlSerializer
- href: ../../core/additional-tools/xml-serializer-generator.md
- name: Diagnostics and instrumentation
items:
- name: Overview
diff --git a/docs/standard/base-types/custom-timespan-format-strings.md b/docs/standard/base-types/custom-timespan-format-strings.md
index 58e9728dd904f..018670d7e0e06 100644
--- a/docs/standard/base-types/custom-timespan-format-strings.md
+++ b/docs/standard/base-types/custom-timespan-format-strings.md
@@ -39,53 +39,53 @@ Custom format strings are also used by the
More information: [The "d" custom format specifier](#dSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`%d` --> "6"
`d\.hh\:mm` --> "6.14:32"|
-|"dd"-"dddddddd"|The number of whole days in the time interval, padded with leading zeros as needed.
More information: [The "dd"-"dddddddd" custom format specifiers](#ddSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`ddd` --> "006"
`dd\.hh\:mm` --> "06.14:32"|
-|"h", "%h"|The number of whole hours in the time interval that aren't counted as part of days. Single-digit hours don't have a leading zero.
More information: [The "h" custom format specifier](#hSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`%h` --> "14"
`hh\:mm` --> "14:32"|
-|"hh"|The number of whole hours in the time interval that aren't counted as part of days. Single-digit hours have a leading zero.
More information: [The "hh" custom format specifier](#hhSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`hh` --> "14"
`new TimeSpan(6, 8, 32, 17, 685):`
`hh` --> 08|
-|"m", "%m"|The number of whole minutes in the time interval that aren't included as part of hours or days. Single-digit minutes don't have a leading zero.
More information: [The "m" custom format specifier](#mSpecifier).|`new TimeSpan(6, 14, 8, 17, 685):`
`%m` --> "8"
`h\:m` --> "14:8"|
-|"mm"|The number of whole minutes in the time interval that aren't included as part of hours or days. Single-digit minutes have a leading zero.
More information: [The "mm" custom format specifier](#mmSpecifier).|`new TimeSpan(6, 14, 8, 17, 685):`
`mm` --> "08"
`new TimeSpan(6, 8, 5, 17, 685):`
`d\.hh\:mm\:ss` --> 6.08:05:17|
-|"s", "%s"|The number of whole seconds in the time interval that aren't included as part of hours, days, or minutes. Single-digit seconds don't have a leading zero.
More information: [The "s" custom format specifier](#sSpecifier).|`TimeSpan.FromSeconds(12.965)`:
`%s` --> 12
`s\.fff` --> 12.965|
-|"ss"|The number of whole seconds in the time interval that aren't included as part of hours, days, or minutes. Single-digit seconds have a leading zero.
More information: [The "ss" custom format specifier](#ssSpecifier).|`TimeSpan.FromSeconds(6.965)`:
`ss` --> 06
`ss\.fff` --> 06.965|
-|"f", "%f"|The tenths of a second in a time interval.
More information: [The "f" custom format specifier](#fSpecifier).|`TimeSpan.FromSeconds(6.895)`:
`f` --> 8
`ss\.f` --> 06.8|
-|"ff"|The hundredths of a second in a time interval.
More information: [The "ff" custom format specifier](#ffSpecifier).|`TimeSpan.FromSeconds(6.895)`:
`ff` --> 89
`ss\.ff` --> 06.89|
-|"fff"|The milliseconds in a time interval.
More information: [The "fff" custom format specifier](#f3Specifier).|`TimeSpan.FromSeconds(6.895)`:
`fff` --> 895
`ss\.fff` --> 06.895|
-|"ffff"|The ten-thousandths of a second in a time interval.
More information: [The "ffff" custom format specifier](#f4Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`ffff` --> 8954
`ss\.ffff` --> 06.8954|
-|"fffff"|The hundred-thousandths of a second in a time interval.
More information: [The "fffff" custom format specifier](#f5Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`fffff` --> 89543
`ss\.fffff` --> 06.89543|
-|"ffffff"|The millionths of a second in a time interval.
More information: [The "ffffff" custom format specifier](#f6Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`ffffff` --> 895432
`ss\.ffffff` --> 06.895432|
-|"fffffff"|The ten-millionths of a second (or the fractional ticks) in a time interval.
More information: [The "fffffff" custom format specifier](#f7Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`fffffff` --> 8954321
`ss\.fffffff` --> 06.8954321|
-|"F", "%F"|The tenths of a second in a time interval. Nothing is displayed if the digit is zero.
More information: [The "F" custom format specifier](#F_Specifier).|`TimeSpan.Parse("00:00:06.32")`:
`%F`: 3
`TimeSpan.Parse("0:0:3.091")`:
`ss\.F`: 03.|
-|"FF"|The hundredths of a second in a time interval. Any fractional trailing zeros or two zero digits aren't included.
More information: [The "FF" custom format specifier](#FF_Specifier).|`TimeSpan.Parse("00:00:06.329")`:
`FF`: 32
`TimeSpan.Parse("0:0:3.101")`:
`ss\.FF`: 03.1|
-|"FFF"|The milliseconds in a time interval. Any fractional trailing zeros aren't included.
More information:|`TimeSpan.Parse("00:00:06.3291")`:
`FFF`: 329
`TimeSpan.Parse("0:0:3.1009")`:
`ss\.FFF`: 03.1|
-|"FFFF"|The ten-thousandths of a second in a time interval. Any fractional trailing zeros aren't included.
More information: [The "FFFF" custom format specifier](#F4_Specifier).|`TimeSpan.Parse("00:00:06.32917")`:
`FFFFF`: 3291
`TimeSpan.Parse("0:0:3.10009")`:
`ss\.FFFF`: 03.1|
-|"FFFFF"|The hundred-thousandths of a second in a time interval. Any fractional trailing zeros aren't included.
More information: [The "FFFFF" custom format specifier](#F5_Specifier).|`TimeSpan.Parse("00:00:06.329179")`:
`FFFFF`: 32917
`TimeSpan.Parse("0:0:3.100009")`:
`ss\.FFFFF`: 03.1|
-|"FFFFFF"|The millionths of a second in a time interval. Any fractional trailing zeros aren't displayed.
More information: [The "FFFFFF" custom format specifier](#F6_Specifier).|`TimeSpan.Parse("00:00:06.3291791")`:
`FFFFFF`: 329179
`TimeSpan.Parse("0:0:3.1000009")`:
`ss\.FFFFFF`: 03.1|
-|"FFFFFFF"|The ten-millions of a second in a time interval. Any fractional trailing zeros or seven zeros aren't displayed.
More information: [The "FFFFFFF" custom format specifier](#F7_Specifier).|`TimeSpan.Parse("00:00:06.3291791")`:
`FFFFFF`: 3291791
`TimeSpan.Parse("0:0:3.1900000")`:
`ss\.FFFFFF`: 03.19|
+|`"d"`, `"%d"`|The number of whole days in the time interval.
More information: [The `"d"` custom format specifier](#dSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`%d` --> "6"
`d\.hh\:mm` --> "6.14:32"|
+|`"dd"`-`"dddddddd"`|The number of whole days in the time interval, padded with leading zeros as needed.
More information: [The `"dd"`-`"dddddddd"` custom format specifiers](#ddSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`ddd` --> "006"
`dd\.hh\:mm` --> "06.14:32"|
+|`"h"`, `"%h"`|The number of whole hours in the time interval that aren't counted as part of days. Single-digit hours don't have a leading zero.
More information: [The `"h"` custom format specifier](#hSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`%h` --> "14"
`hh\:mm` --> "14:32"|
+|`"hh"`|The number of whole hours in the time interval that aren't counted as part of days. Single-digit hours have a leading zero.
More information: [The `"hh"` custom format specifier](#hhSpecifier).|`new TimeSpan(6, 14, 32, 17, 685):`
`hh` --> "14"
`new TimeSpan(6, 8, 32, 17, 685):`
`hh` --> 08|
+|`"m"`, `"%m"`|The number of whole minutes in the time interval that aren't included as part of hours or days. Single-digit minutes don't have a leading zero.
More information: [The `"m"` custom format specifier](#mSpecifier).|`new TimeSpan(6, 14, 8, 17, 685):`
`%m` --> "8"
`h\:m` --> "14:8"|
+|`"mm"`|The number of whole minutes in the time interval that aren't included as part of hours or days. Single-digit minutes have a leading zero.
More information: [The `"mm"` custom format specifier](#mmSpecifier).|`new TimeSpan(6, 14, 8, 17, 685):`
`mm` --> "08"
`new TimeSpan(6, 8, 5, 17, 685):`
`d\.hh\:mm\:ss` --> 6.08:05:17|
+|`"s"`, `"%s"`|The number of whole seconds in the time interval that aren't included as part of hours, days, or minutes. Single-digit seconds don't have a leading zero.
More information: [The `"s"` custom format specifier](#sSpecifier).|`TimeSpan.FromSeconds(12.965)`:
`%s` --> 12
`s\.fff` --> 12.965|
+|`"ss"`|The number of whole seconds in the time interval that aren't included as part of hours, days, or minutes. Single-digit seconds have a leading zero.
More information: [The `"ss"` custom format specifier](#ssSpecifier).|`TimeSpan.FromSeconds(6.965)`:
`ss` --> 06
`ss\.fff` --> 06.965|
+|`"f"`, `"%f"`|The tenths of a second in a time interval.
More information: [The `"f"` custom format specifier](#fSpecifier).|`TimeSpan.FromSeconds(6.895)`:
`f` --> 8
`ss\.f` --> 06.8|
+|`"ff"`|The hundredths of a second in a time interval.
More information: [The `"ff"` custom format specifier](#ffSpecifier).|`TimeSpan.FromSeconds(6.895)`:
`ff` --> 89
`ss\.ff` --> 06.89|
+|`"fff"`|The milliseconds in a time interval.
More information: [The `"fff"` custom format specifier](#f3Specifier).|`TimeSpan.FromSeconds(6.895)`:
`fff` --> 895
`ss\.fff` --> 06.895|
+|`"ffff"`|The ten-thousandths of a second in a time interval.
More information: [The `"ffff"` custom format specifier](#f4Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`ffff` --> 8954
`ss\.ffff` --> 06.8954|
+|`"fffff"`|The hundred-thousandths of a second in a time interval.
More information: [The `"fffff"` custom format specifier](#f5Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`fffff` --> 89543
`ss\.fffff` --> 06.89543|
+|`"ffffff"`|The millionths of a second in a time interval.
More information: [The `"ffffff"` custom format specifier](#f6Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`ffffff` --> 895432
`ss\.ffffff` --> 06.895432|
+|`"fffffff"`|The ten-millionths of a second (or the fractional ticks) in a time interval.
More information: [The `"fffffff"` custom format specifier](#f7Specifier).|`TimeSpan.Parse("0:0:6.8954321")`:
`fffffff` --> 8954321
`ss\.fffffff` --> 06.8954321|
+|`"F"`, `"%F"`|The tenths of a second in a time interval. Nothing is displayed if the digit is zero.
More information: [The `"F"` custom format specifier](#F_Specifier).|`TimeSpan.Parse("00:00:06.32")`:
`%F`: 3
`TimeSpan.Parse("0:0:3.091")`:
`ss\.F`: 03.|
+|`"FF"`|The hundredths of a second in a time interval. Any fractional trailing zeros or two zero digits aren't included.
More information: [The `"FF"` custom format specifier](#FF_Specifier).|`TimeSpan.Parse("00:00:06.329")`:
`FF`: 32
`TimeSpan.Parse("0:0:3.101")`:
`ss\.FF`: 03.1|
+|`"FFF"`|The milliseconds in a time interval. Any fractional trailing zeros aren't included.
More information:|`TimeSpan.Parse("00:00:06.3291")`:
`FFF`: 329
`TimeSpan.Parse("0:0:3.1009")`:
`ss\.FFF`: 03.1|
+|`"FFFF"`|The ten-thousandths of a second in a time interval. Any fractional trailing zeros aren't included.
More information: [The `"FFFF"` custom format specifier](#F4_Specifier).|`TimeSpan.Parse("00:00:06.32917")`:
`FFFFF`: 3291
`TimeSpan.Parse("0:0:3.10009")`:
`ss\.FFFF`: 03.1|
+|`"FFFFF"`|The hundred-thousandths of a second in a time interval. Any fractional trailing zeros aren't included.
More information: [The `"FFFFF"` custom format specifier](#F5_Specifier).|`TimeSpan.Parse("00:00:06.329179")`:
`FFFFF`: 32917
`TimeSpan.Parse("0:0:3.100009")`:
`ss\.FFFFF`: 03.1|
+|`"FFFFFF"`|The millionths of a second in a time interval. Any fractional trailing zeros aren't displayed.
More information: [The `"FFFFFF"` custom format specifier](#F6_Specifier).|`TimeSpan.Parse("00:00:06.3291791")`:
`FFFFFF`: 329179
`TimeSpan.Parse("0:0:3.1000009")`:
`ss\.FFFFFF`: 03.1|
+|`"FFFFFFF"`|The ten-millions of a second in a time interval. Any fractional trailing zeros or seven zeros aren't displayed.
More information: [The `"FFFFFFF"` custom format specifier](#F7_Specifier).|`TimeSpan.Parse("00:00:06.3291791")`:
`FFFFFF`: 3291791
`TimeSpan.Parse("0:0:3.1900000")`:
`ss\.FFFFFF`: 03.19|
|'*string*'|Literal string delimiter.
More information: [Other characters](#other-characters).|`new TimeSpan(14, 32, 17):`
`hh':'mm':'ss` --> "14:32:17"|
|\|The escape character.
More information: [Other characters](#other-characters).|`new TimeSpan(14, 32, 17):`
`hh\:mm\:ss` --> "14:32:17"|
|Any other character|Any other unescaped character is interpreted as a custom format specifier.
More Information: [Other characters](#other-characters).|`new TimeSpan(14, 32, 17):`
`hh\:mm\:ss` --> "14:32:17"|
-## The "d" custom format specifier
+## The `"d"` custom format specifier
-The "d" custom format specifier outputs the value of the property, which represents the number of whole days in the time interval. It outputs the full number of days in a value, even if the value has more than one digit. If the value of the property is zero, the specifier outputs "0".
+The `"d"` custom format specifier outputs the value of the property, which represents the number of whole days in the time interval. It outputs the full number of days in a value, even if the value has more than one digit. If the value of the property is zero, the specifier outputs "0".
-If the "d" custom format specifier is used alone, specify "%d" so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
+If the `"d"` custom format specifier is used alone, specify `"%d"` so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#3](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#3)]
[!code-vb[Conceptual.TimeSpan.Custom#3](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#3)]
-The following example illustrates the use of the "d" custom format specifier.
+The following example illustrates the use of the `"d"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#4](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#4)]
[!code-vb[Conceptual.TimeSpan.Custom#4](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#4)]
[Back to table](#table)
-## The "dd"-"dddddddd" custom format specifiers
+## The `"dd"`-`"dddddddd"` custom format specifiers
-The "dd", "ddd", "dddd", "ddddd", "dddddd", "ddddddd", and "dddddddd" custom format specifiers output the value of the property, which represents the number of whole days in the time interval.
+The `"dd"`, `"ddd"`, `"dddd"`, `"ddddd"`, `"dddddd"`, `"ddddddd"`, and `"dddddddd"` custom format specifiers output the value of the property, which represents the number of whole days in the time interval.
-The output string includes a minimum number of digits specified by the number of "d" characters in the format specifier, and it's padded with leading zeros as needed. If the digits in the number of days exceed the number of "d" characters in the format specifier, the full number of days is output in the result string.
+The output string includes a minimum number of digits specified by the number of `d` characters in the format specifier, and it's padded with leading zeros as needed. If the digits in the number of days exceed the number of `d` characters in the format specifier, the full number of days is output in the result string.
The following example uses these format specifiers to display the string representation of two values. The value of the days component of the first time interval is zero; the value of the days component of the second is 365.
@@ -94,269 +94,269 @@ The following example uses these format specifiers to display the string represe
[Back to table](#table)
-## The "h" custom format specifier
+## The `"h"` custom format specifier
-The "h" custom format specifier outputs the value of the property, which represents the number of whole hours in the time interval that isn't counted as part of its day component. It returns a one-digit string value if the value of the property is 0 through 9, and it returns a two-digit string value if the value of the property ranges from 10 to 23.
+The `"h"` custom format specifier outputs the value of the property, which represents the number of whole hours in the time interval that isn't counted as part of its day component. It returns a one-digit string value if the value of the property is 0 through 9, and it returns a two-digit string value if the value of the property ranges from 10 to 23.
-If the "h" custom format specifier is used alone, specify "%h" so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
+If the `"h"` custom format specifier is used alone, specify `"%h"` so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#6](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#6)]
[!code-vb[Conceptual.TimeSpan.Custom#6](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#6)]
-Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the "%h" custom format specifier instead to interpret the numeric string as the number of hours. The following example provides an illustration.
+Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the `"%h"` custom format specifier instead to interpret the numeric string as the number of hours. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#8](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#8)]
[!code-vb[Conceptual.TimeSpan.Custom#8](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#8)]
-The following example illustrates the use of the "h" custom format specifier.
+The following example illustrates the use of the `"h"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#7](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#7)]
[!code-vb[Conceptual.TimeSpan.Custom#7](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#7)]
[Back to table](#table)
-## The "hh" custom format specifier
+## The `"hh"` custom format specifier
-The "hh" custom format specifier outputs the value of the property, which represents the number of whole hours in the time interval that isn't counted as part of its day component. For values from 0 through 9, the output string includes a leading zero.
+The `"hh"` custom format specifier outputs the value of the property, which represents the number of whole hours in the time interval that isn't counted as part of its day component. For values from 0 through 9, the output string includes a leading zero.
-Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the "hh" custom format specifier instead to interpret the numeric string as the number of hours. The following example provides an illustration.
+Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the `"hh"` custom format specifier instead to interpret the numeric string as the number of hours. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#9](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#9)]
[!code-vb[Conceptual.TimeSpan.Custom#9](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#9)]
-The following example illustrates the use of the "hh" custom format specifier.
+The following example illustrates the use of the `"hh"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#10](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#10)]
[!code-vb[Conceptual.TimeSpan.Custom#10](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#10)]
[Back to table](#table)
-## The "m" custom format specifier
+## The `"m"` custom format specifier
-The "m" custom format specifier outputs the value of the property, which represents the number of whole minutes in the time interval that isn't counted as part of its day component. It returns a one-digit string value if the value of the property is 0 through 9, and it returns a two-digit string value if the value of the property ranges from 10 to 59.
+The `"m"` custom format specifier outputs the value of the property, which represents the number of whole minutes in the time interval that isn't counted as part of its day component. It returns a one-digit string value if the value of the property is 0 through 9, and it returns a two-digit string value if the value of the property ranges from 10 to 59.
-If the "m" custom format specifier is used alone, specify "%m" so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
+If the `"m"` custom format specifier is used alone, specify `"%m"` so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#6](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#6)]
[!code-vb[Conceptual.TimeSpan.Custom#6](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#6)]
-Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the "%m" custom format specifier instead to interpret the numeric string as the number of minutes. The following example provides an illustration.
+Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the `"%m"` custom format specifier instead to interpret the numeric string as the number of minutes. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#11](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#11)]
[!code-vb[Conceptual.TimeSpan.Custom#11](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#11)]
-The following example illustrates the use of the "m" custom format specifier.
+The following example illustrates the use of the `"m"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#12](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#12)]
[!code-vb[Conceptual.TimeSpan.Custom#12](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#12)]
[Back to table](#table)
-## The "mm" custom format specifier
+## The `"mm"` custom format specifier
-The "mm" custom format specifier outputs the value of the property, which represents the number of whole minutes in the time interval that isn't included as part of its hours or days component. For values from 0 through 9, the output string includes a leading zero.
+The `"mm"` custom format specifier outputs the value of the property, which represents the number of whole minutes in the time interval that isn't included as part of its hours or days component. For values from 0 through 9, the output string includes a leading zero.
-Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the "mm" custom format specifier instead to interpret the numeric string as the number of minutes. The following example provides an illustration.
+Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the `"mm"` custom format specifier instead to interpret the numeric string as the number of minutes. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#13](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#13)]
[!code-vb[Conceptual.TimeSpan.Custom#13](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#13)]
-The following example illustrates the use of the "mm" custom format specifier.
+The following example illustrates the use of the `"mm"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#14](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#14)]
[!code-vb[Conceptual.TimeSpan.Custom#14](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#14)]
[Back to table](#table)
-## The "s" custom format specifier
+## The `"s"` custom format specifier
-The "s" custom format specifier outputs the value of the property, which represents the number of whole seconds in the time interval that isn't included as part of its hours, days, or minutes component. It returns a one-digit string value if the value of the property is 0 through 9, and it returns a two-digit string value if the value of the property ranges from 10 to 59.
+The `"s"` custom format specifier outputs the value of the property, which represents the number of whole seconds in the time interval that isn't included as part of its hours, days, or minutes component. It returns a one-digit string value if the value of the property is 0 through 9, and it returns a two-digit string value if the value of the property ranges from 10 to 59.
-If the "s" custom format specifier is used alone, specify "%s" so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
+If the `"s"` custom format specifier is used alone, specify `"%s"` so that it isn't misinterpreted as a standard format string. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#15](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#15)]
[!code-vb[Conceptual.TimeSpan.Custom#15](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#15)]
-Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the "%s" custom format specifier instead to interpret the numeric string as the number of seconds. The following example provides an illustration.
+Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the `"%s"` custom format specifier instead to interpret the numeric string as the number of seconds. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#17](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#17)]
[!code-vb[Conceptual.TimeSpan.Custom#17](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#17)]
-The following example illustrates the use of the "s" custom format specifier.
+The following example illustrates the use of the `"s"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#16](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#16)]
[!code-vb[Conceptual.TimeSpan.Custom#16](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#16)]
[Back to table](#table)
-## The "ss" custom format specifier
+## The `"ss"` custom format specifier
-The "ss" custom format specifier outputs the value of the property, which represents the number of whole seconds in the time interval that isn't included as part of its hours, days, or minutes component. For values from 0 through 9, the output string includes a leading zero.
+The `"ss"` custom format specifier outputs the value of the property, which represents the number of whole seconds in the time interval that isn't included as part of its hours, days, or minutes component. For values from 0 through 9, the output string includes a leading zero.
-Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the "ss" custom format specifier instead to interpret the numeric string as the number of seconds. The following example provides an illustration.
+Ordinarily, in a parsing operation, an input string that includes only a single number is interpreted as the number of days. You can use the `"ss"` custom format specifier instead to interpret the numeric string as the number of seconds. The following example provides an illustration.
[!code-csharp[Conceptual.TimeSpan.Custom#18](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#18)]
[!code-vb[Conceptual.TimeSpan.Custom#18](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#18)]
-The following example illustrates the use of the "ss" custom format specifier.
+The following example illustrates the use of the `"ss"` custom format specifier.
[!code-csharp[Conceptual.TimeSpan.Custom#19](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs#19)]
[!code-vb[Conceptual.TimeSpan.Custom#19](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/customexamples1.vb#19)]
[Back to table](#table)
-## The "f" custom format specifier
+## The `"f"` custom format specifier
-The "f" custom format specifier outputs the tenths of a second in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly one fractional digit.
+The `"f"` custom format specifier outputs the tenths of a second in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly one fractional digit.
-If the "f" custom format specifier is used alone, specify "%f" so that it isn't misinterpreted as a standard format string.
+If the `"f"` custom format specifier is used alone, specify `"%f"` so that it isn't misinterpreted as a standard format string.
-The following example uses the "f" custom format specifier to display the tenths of a second in a value. "f" is used first as the only format specifier, and then combined with the "s" specifier in a custom format string.
+The following example uses the `"f"` custom format specifier to display the tenths of a second in a value. `"f"` is used first as the only format specifier, and then combined with the `"s"` specifier in a custom format string.
[!code-csharp[Conceptual.TimeSpan.Custom#20](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/fspecifiers1.cs#20)]
[!code-vb[Conceptual.TimeSpan.Custom#20](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/fspecifiers1.vb#20)]
[Back to table](#table)
-## The "ff" custom format specifier
+## The `"ff"` custom format specifier
-The "ff" custom format specifier outputs the hundredths of a second in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly two fractional digits.
+The `"ff"` custom format specifier outputs the hundredths of a second in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly two fractional digits.
-The following example uses the "ff" custom format specifier to display the hundredths of a second in a value. "ff" is used first as the only format specifier, and then combined with the "s" specifier in a custom format string.
+The following example uses the `"ff"` custom format specifier to display the hundredths of a second in a value. `"ff"` is used first as the only format specifier, and then combined with the `"s"` specifier in a custom format string.
[!code-csharp[Conceptual.TimeSpan.Custom#20](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/fspecifiers1.cs#20)]
[!code-vb[Conceptual.TimeSpan.Custom#20](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/fspecifiers1.vb#20)]
[Back to table](#table)
-## The "fff" custom format specifier
+## The `"fff"` custom format specifier
-The "fff" custom format specifier (with three "f" characters) outputs the milliseconds in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly three fractional digits.
+The `"fff"` custom format specifier (with three `f` characters) outputs the milliseconds in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly three fractional digits.
-The following example uses the "fff" custom format specifier to display the milliseconds in a value. "fff" is used first as the only format specifier, and then combined with the "s" specifier in a custom format string.
+The following example uses the `"fff"` custom format specifier to display the milliseconds in a value. `"fff"` is used first as the only format specifier, and then combined with the `"s"` specifier in a custom format string.
[!code-csharp[Conceptual.TimeSpan.Custom#20](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/fspecifiers1.cs#20)]
[!code-vb[Conceptual.TimeSpan.Custom#20](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.timespan.custom/vb/fspecifiers1.vb#20)]
[Back to table](#table)
-## The "ffff" custom format specifier
+## The `"ffff"` custom format specifier
-The "ffff" custom format specifier (with four "f" characters) outputs the ten-thousandths of a second in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly four fractional digits.
+The `"ffff"` custom format specifier (with four `f` characters) outputs the ten-thousandths of a second in a time interval. In a formatting operation, any remaining fractional digits are truncated. In a parsing operation that calls the or method, the input string must contain exactly four fractional digits.
-The following example uses the "ffff" custom format specifier to display the ten-thousandths of a second in a