Skip to content

Commit e182f42

Browse files
Merge pull request #45128 from dotnet/main
Merge main into live
2 parents e9d200e + 94c349e commit e182f42

File tree

14 files changed

+129
-90
lines changed

14 files changed

+129
-90
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

docs/azure/includes/dotnet-new.md

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

docs/core/diagnostics/dotnet-monitor.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet-monitor diagnostic tool - .NET
33
description: Learn how to install and use the dotnet-monitor tool to collect dumps, traces, logs, and metrics from applications in production environments.
4-
ms.date: 06/16/2022
4+
ms.date: 03/04/2025
55
ms.topic: reference
66
---
77
# Diagnostic monitoring and collection utility (dotnet-monitor)
@@ -183,12 +183,12 @@ dotnet-monitor config show [-h|--help] [-u|--urls] [-m|--metrics] [--metricUrls]
183183

184184
## dotnet-monitor generatekey
185185

186-
Generate an API key and hash for HTTP authentication.
186+
Generate an API key and hash for HTTP authentication.
187187

188188
### Synopsis
189189

190190
```console
191-
dotnet-monitor generatekey [-h|--help] [-o|--output]
191+
dotnet-monitor generatekey [-h|--help] [-o|--output] [-e|--expiration]
192192
```
193193

194194
### Options
@@ -209,6 +209,10 @@ dotnet-monitor generatekey [-h|--help] [-o|--output]
209209
- `Shell` - Outputs in a format usable in Linux shells such as Bash.
210210
- `Text` - Outputs in a format that is plain text.
211211

212-
## See Also
212+
- **`-e|--expiration <expiration>`**
213+
214+
The expiration time after which the generated API key will no longer be accepted. The value must be in <xref:System.TimeSpan> format (for example, "7.00:00:00" for 7 days). Default: "7.00:00:00" (7 days).
215+
216+
## See also
213217

214218
- [dotnet/dotnet-monitor](https://github.com/dotnet/dotnet-monitor/tree/main/documentation)

docs/core/install/linux-ubuntu.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: .NET and Ubuntu overview
33
description: Learn about the ways you can install .NET on Ubuntu, either from the built-in package feed, the .NET backports repository, or the Microsoft repository.
44
author: adegeo
55
ms.author: adegeo
6-
ms.date: 12/13/2024
6+
ms.date: 03/03/2025
77
ms.custom: updateeachrelease, linux-related-content
88
---
99

@@ -48,7 +48,7 @@ Use the following sections to determine how you should install .NET:
4848

4949
### I'm using Ubuntu 22.04 or later, and I only need .NET
5050

51-
Install .NET through the Ubuntu feed. For more information, see the following pages:
51+
If you don't need other Microsoft packages, such as `powershell`, `mdatp`, or `mssql`, install .NET through the Ubuntu feed. For more information, see the following pages:
5252

5353
- [Install .NET on Ubuntu 24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2410).
5454
- [Install .NET on Ubuntu 24.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2404).
@@ -137,27 +137,34 @@ Canonical supports .NET versions in the built-in Ubuntu feed for the lifetime of
137137

138138
[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)]
139139

140-
## Ubuntu .NET backports package repository
140+
## Register a package repository
141+
142+
Depending on your version of Ubuntu, you might need to register either the Ubuntu backports or the Microsoft package repository.
143+
144+
> [!IMPORTANT]
145+
> Make sure you consider the information in the [Decide how to install .NET section](#decide-how-to-install-net).
146+
147+
- [Register the Ubuntu .NET backports package repository](#ubuntu-net-backports-package-repository)
148+
- [Register the Microsoft package repository](#register-the-microsoft-package-repository)
149+
150+
### Ubuntu .NET backports package repository
141151

142152
The Ubuntu .NET backports package repository provides versions of .NET that aren't available in the built-in Ubuntu feed. The [Supported distributions](#supported-distributions) section provides a table that lists which versions of .NET are available in the package feed. Canonical maintains the packages contained in this package repository and provides best-effort support, which does not extend beyond the Microsoft-provided support lifetime or the support period of the particular Ubuntu version.
143153

144154
See the [web-view of the Ubuntu .NET backports package repository](https://launchpad.net/~dotnet/+archive/ubuntu/backports) for more details.
145155

146-
### Register the Ubuntu .NET backports package repository
156+
#### Register the Ubuntu .NET backports package repository
147157

148158
Open a terminal and run the following command:
149159

150160
```bash
151161
sudo add-apt-repository ppa:dotnet/backports
152162
```
153163

154-
> [!TIP]
155-
> You do not need to call `apt update`. The `add-apt-repository` command does this by default.
156-
157164
> [!NOTE]
158165
> The Ubuntu .NET backports package repository is compatible with the built-in Ubuntu feed. Therefore you do not need to configure your package manager to ignore .NET packages in the built-in Ubuntu feed.
159166
160-
### Unregister the Ubuntu .NET backports package repository
167+
#### Unregister the Ubuntu .NET backports package repository
161168

162169
If you no longer want to consume packages from the Ubuntu .NET backports package repository you can unregister it. Open a terminal and run the following command:
163170

@@ -168,7 +175,7 @@ sudo add-apt-repository --remove ppa:dotnet/backports
168175
> [!IMPORTANT]
169176
> Unregistering the Ubuntu .NET backports package repository does not uninstall any packages.
170177
171-
### add-apt-repository command not found
178+
#### add-apt-repository command not found
172179

173180
The [`add-apt-repository(1)`](https://manpages.ubuntu.com/manpages/noble/en/man1/add-apt-repository.1.html) utility is pre-installed on most Ubuntu installations.
174181

@@ -179,7 +186,7 @@ sudo apt update
179186
sudo apt install software-properties-common
180187
```
181188

182-
## Register the Microsoft package repository
189+
### Register the Microsoft package repository
183190

184191
> [!IMPORTANT]
185192
> This only applies to Ubuntu versions prior to 24.04. Starting with Ubuntu 24.04, Microsoft no longer publishes packages to the Microsoft package repository. Use the [supported distributions table](#supported-distributions) to determine the best way to install .NET.
@@ -221,7 +228,11 @@ sudo apt update
221228
>
222229
> You can use a web browser and navigate to <https://packages.microsoft.com/config/ubuntu/> to see which versions of Ubuntu are available to use as the `$repo_version` value.
223230
224-
## Install .NET
231+
## Install, uninstall, or update .NET
232+
233+
The following sections describe how to manage .NET through the package manager.
234+
235+
### Install .NET
225236

226237
Install .NET through the package manager with the `sudo apt install <package-name>` command. Replace `<package-name>` with the name of the .NET package you want to install. For example, to install .NET SDK 9.0, use the command `sudo apt install dotnet-sdk-9.0`. The following table lists the currently supported .NET packages (which [might vary by your Ubuntu version](#supported-distributions)):
227238

@@ -239,7 +250,7 @@ Install .NET through the package manager with the `sudo apt install <package-nam
239250
240251
Some environment variables affect how .NET is run after it's installed. For more information, see [.NET SDK and CLI environment variables](../tools/dotnet-environment-variables.md#net-sdk-and-cli-environment-variables).
241252

242-
## Uninstall .NET
253+
### Uninstall .NET
243254

244255
If you installed .NET through a package manager, uninstall in the same way with the `apt-get remove` command:
245256

@@ -249,15 +260,7 @@ sudo apt-get remove dotnet-sdk-6.0
249260

250261
For more information, see [Uninstall .NET](remove-runtime-sdk-versions.md?pivots=os-linux#uninstall-net).
251262

252-
## Install preview versions
253-
254-
[!INCLUDE [preview installs don't support package managers](./includes/linux-install-previews.md)]
255-
256-
## Remove preview versions
257-
258-
[!INCLUDE [package-manager uninstall notice](./includes/linux-uninstall-preview-info.md)]
259-
260-
## Use APT to update .NET
263+
### Update .NET
261264

262265
If you installed .NET through a package manager, you can upgrade the package with the `apt upgrade` command. For example, the following commands upgrade the `dotnet-sdk-9.0` package with the latest version:
263266

@@ -269,6 +272,18 @@ sudo apt upgrade dotnet-sdk-9.0
269272
> [!TIP]
270273
> If you've upgraded your Linux distribution since installing .NET, you may need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates.
271274
275+
## Manage preview versions
276+
277+
The following sections describe how to install and uninstall preview releases of .NET.
278+
279+
### Install preview versions
280+
281+
[!INCLUDE [preview installs don't support package managers](./includes/linux-install-previews.md)]
282+
283+
### Remove preview versions
284+
285+
[!INCLUDE [package-manager uninstall notice](./includes/linux-uninstall-preview-info.md)]
286+
272287
## Troubleshooting
273288

274289
Starting with Ubuntu 22.04, you might run into a situation where it seems only a piece of .NET is available. For example, you've installed the runtime and the SDK, but when you run `dotnet --info` only the runtime is listed. This situation can be related to using two different package sources. The built-in Ubuntu 22.04 and Ubuntu 22.10 package feeds include some versions of .NET, but not all, and you might have also installed .NET from the Microsoft feeds. For more information about how to fix this problem, see [Troubleshoot .NET errors related to missing files on Linux](linux-package-mixup.md?pivots=os-linux-ubuntu#solutions).

docs/core/testing/unit-testing-platform-faq.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ ms.author: amauryleve
66
ms.date: 07/09/2024
77
---
88

9-
# Microsoft.Testing.Platform FAQ
9+
# Microsoft.Testing.Platform and extensions FAQ
1010

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

13-
## error CS8892: Method 'TestingPlatformEntryPoint.Main(string[])' will not be used as an entry point because a synchronous entry point 'Program.Main(string[])' was found
13+
## Microsoft.Testing.Platform.MSBuild
14+
15+
### error CS8892: Method 'TestingPlatformEntryPoint.Main(string[])' will not be used as an entry point because a synchronous entry point 'Program.Main(string[])' was found
1416

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

@@ -19,3 +21,12 @@ Manually defining an entry point (`Main`) in a test project or referencing a tes
1921
- Disable the generation of the entry point by setting the `<GenerateTestingPlatformEntryPoint>false</GenerateTestingPlatformEntryPoint>` MSBuild property.
2022

2123
- Completely disable the transitive dependency to `Microsoft.Testing.Platform.MSBuild` by setting the `<IsTestingPlatformApplication>false</IsTestingPlatformApplication>` MSBuild property in the project that references a test project. This is needed when you reference a test project from a non-test project, for example, a console app that references a test application.
24+
25+
## Microsoft.Testing.Extensions.Fakes
26+
27+
### Fakes error Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables
28+
29+
This error can occur if not all of the Fakes assemblies are present in the bin folder.
30+
31+
- Ensure that the project either uses the [MSTest.SDK](./unit-testing-mstest-sdk.md) or references [Microsoft.Testing.Extensions.Fakes](./unit-testing-platform-extensions-fakes.md).
32+
- For .NET Framework projects, avoid setting `<PlatformTarget>AnyCPU</PlatformTarget>` as this results in NuGet not copying all files to the bin folder.

docs/core/testing/unit-testing-platform-vs-vstest.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ VSTest is extensible and common types are placed in [Microsoft.TestPlatform.Obje
3636

3737
Microsoft.Testing.Platform is based on [Microsoft.Testing.Platform](https://www.nuget.org/packages/Microsoft.Testing.Platform) NuGet package and other libraries in the `Microsoft.Testing.*` namespace. Like VSTest, the `Microsoft.Testing.Platform` is open-source and has a [microsoft/testfx](https://github.com/microsoft/testfx/tree/main/src/Platform/Microsoft.Testing.Platform) GitHub repository.
3838

39-
## Communication protocol (preview)
39+
## Communication protocol
4040

4141
> [!NOTE]
42-
> The Visual Studio Test Explorer supports the Microsoft.Testing.Platform protocol in the **preview** versions since 17.10 onward. If you run/debug your tests using earlier versions of Visual Studio, Test Explorer will use `vstest.console.exe` and the old protocol to run these tests.
42+
> The Visual Studio Test Explorer supports the Microsoft.Testing.Platform protocol since 17.12 onward. If you run/debug your tests using earlier versions of Visual Studio, Test Explorer will use `vstest.console.exe` and the old protocol to run these tests.
4343
4444
Microsoft.Testing.Platform uses a JSON-RPC based protocol to communicate between Visual Studio and the test runner process. The protocol is documented in the [MSTest GitHub repository](https://github.com/microsoft/testfx/tree/main/docs/mstest-runner-protocol).
4545

@@ -49,6 +49,8 @@ VSTest also uses a JSON based communication protocol, but it's not JSON-RPC base
4949

5050
To disable the use of the new protocol in Test Explorer, you can edit your project to add the following property: `<DisableTestingPlatformServerCapability>true</DisableTestingPlatformServerCapability>`.
5151

52+
You can also go to Preview Features options in Visual Studio and deselect the "Use testing platform server mode" option.
53+
5254
## Executables
5355

5456
VSTest ships multiple executables, notably `vstest.console.exe`, `testhost.exe`, and `datacollector.exe`. However, MSTest is embedded directly into your test project and doesn't ship any other executables. The executable your test project compiles to is used to host all the testing tools and carry out all the tasks needed to run tests.

docs/core/tools/dotnet-list-package.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ The project or solution file to operate on. If not specified, the command search
118118

119119
- **`--vulnerable`**
120120

121-
Lists packages that have known vulnerabilities. Cannot be combined with `--deprecated` or `--outdated` options. Nuget.org is the source of information about vulnerabilities. For more information, see [Vulnerabilities](/nuget/api/registration-base-url-resource) and [How to Scan NuGet Packages for Security Vulnerabilities](https://devblogs.microsoft.com/nuget/how-to-scan-nuget-packages-for-security-vulnerabilities/).
121+
Lists packages that have known vulnerabilities. Cannot be combined with `--deprecated` or `--outdated` options.
122+
Use the `<AuditSources>` property in your configuration file to specify your source of vulnerability data, which is acquired from the [VulnerabilityInfo](/nuget/api/vulnerability-info) resource.
123+
If `<AuditSources>` is not specified, the specified `<PackageSources>` are used to load vulnerability data.
124+
For more information, see [Audit sources](/nuget/concepts/auditing-packages#audit-sources) and [How to scan NuGet packages for security vulnerabilities](https://devblogs.microsoft.com/nuget/how-to-scan-nuget-packages-for-security-vulnerabilities/).
122125

123126
- **`--format <console|json>`**
124127

docs/core/tools/dotnet-test.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ dotnet test
419419
[--directory <DIRECTORY_PATH>]
420420
[--test-modules <EXPRESSION>]
421421
[--root-directory <ROOT_PATH>]
422-
[--list-tests]
423422
[--max-parallel-test-modules <NUMBER>]
424423
[-a|--arch <ARCHITECTURE>]
425424
[-c|--configuration <CONFIGURATION>]
@@ -473,10 +472,6 @@ With Microsoft Testing Platform, `dotnet test` operates faster than with VSTest.
473472

474473
Specifies the root directory of the `--test-modules` option. It can only be used with the `--test-modules` option.
475474

476-
- **`--list-tests`**
477-
478-
Lists the discovered tests instead of running the tests.
479-
480475
- **`--max-parallel-test-modules <NUMBER>`**
481476

482477
Specifies the maximum number of test modules that can run in parallel.

docs/core/whats-new/dotnet-10/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ For more information, see [What's new in Windows Forms for .NET 10](/dotnet/desk
9797

9898
## See also
9999

100-
- [.NET 10 Preview 1 container image updates](https://github.com/dotnet/core/blob/dotnet10p1/release-notes/10.0/preview/preview1/containers.md)
101-
- [F# updates in .NET 10 Preview 1](https://github.com/dotnet/core/blob/dotnet10p1/release-notes/10.0/preview/preview1/fsharp.md)
102-
- [Visual Basic updates in .NET 10 Preview 1](https://github.com/dotnet/core/blob/dotnet10p1/release-notes/10.0/preview/preview1/visualbasic.md)
100+
- [.NET 10 Preview 1 container image updates](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/preview1/containers.md)
101+
- [F# updates in .NET 10 Preview 1](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/preview1/fsharp.md)
102+
- [Visual Basic updates in .NET 10 Preview 1](https://github.com/dotnet/core/blob/main/release-notes/10.0/preview/preview1/visualbasic.md)

docs/csharp/language-reference/compiler-options/code-generation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ By default, compiler output from a given set of inputs is unique, since the comp
8080
- @ response files
8181
- Analyzers
8282
- Rulesets
83+
- [Source Link](https://github.com/dotnet/sourcelink) data extracted from the repository (e.g. git commit SHA, repository URL, etc.)
8384
- Other files that may be used by analyzers
8485
- The current culture (for the language in which diagnostics and exception messages are produced).
8586
- The default encoding (or the current code page) if the encoding isn't specified.

0 commit comments

Comments
 (0)