From 74673574b3d0e2c832e9f610c7cf7572c94c85ec Mon Sep 17 00:00:00 2001 From: Marc Rufer Date: Mon, 13 Oct 2025 15:24:32 +0200 Subject: [PATCH 01/17] Fix wrong order for default configuration (#46538) --- docs/core/extensions/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/extensions/configuration.md b/docs/core/extensions/configuration.md index 7f8964e3bf01a..112fbfff7c56f 100644 --- a/docs/core/extensions/configuration.md +++ b/docs/core/extensions/configuration.md @@ -56,8 +56,8 @@ The Date: Mon, 13 Oct 2025 08:35:41 -0500 Subject: [PATCH 02/17] Improve F# XML Documentation page with missing word and project file example (#49031) * Initial plan * Fix missing 'approach' word and add WarnOn project file example Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Update docs/fsharp/language-reference/xml-documentation.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Bill Wagner --- docs/fsharp/language-reference/xml-documentation.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/fsharp/language-reference/xml-documentation.md b/docs/fsharp/language-reference/xml-documentation.md index f9a0587581435..1dbf384215a13 100644 --- a/docs/fsharp/language-reference/xml-documentation.md +++ b/docs/fsharp/language-reference/xml-documentation.md @@ -16,6 +16,12 @@ like [fsdocs](http://fsprojects.github.io/FSharp.Formatting/) to generate API re By default, XML documentation comments are ignored by the compiler. To change this, set `--warnon:3390`. The compiler will then verify the syntax of the XML and the parameters referred to in `` and `` tags. +You can enable this warning in your project file by adding a `` element to a `` section: + +```xml +3390 +``` + You can generate the XML file at compile time by doing one of the following: - You can add a `GenerateDocumentationFile` element to the `` section of your `.fsproj` project file, @@ -49,7 +55,7 @@ The following example shows the alternative method, without XML tags. In this ex ## Comments with XML tags If a comment body begins with `<` (normally ``), then it is treated as an XML formatted comment -body using XML tags. This second way enables you to specify separate notes +body using XML tags. This second approach enables you to specify separate notes for a short summary, additional remarks, documentation for each parameter and type parameter and exceptions thrown, and a description of the return value. The following is a typical XML documentation comment in a signature file: From 1b81aef3a81c558f9bad25ab4c7f4ab4410d62ba Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 08:35:56 -0500 Subject: [PATCH 03/17] Add explanations and XML example for project references in F# tutorial (#49047) * Initial plan * Add explanations and XML example for project references in F# tutorial Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Bill Wagner --- .../get-started/get-started-command-line.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/fsharp/get-started/get-started-command-line.md b/docs/fsharp/get-started/get-started-command-line.md index 17014e8b6c194..1925b78ef0197 100644 --- a/docs/fsharp/get-started/get-started-command-line.md +++ b/docs/fsharp/get-started/get-started-command-line.md @@ -62,7 +62,7 @@ let getJson value = value, json ``` -Add the `Library` project to the `FSharpSample` solution using the [dotnet sln add](../../core/tools/dotnet-sln.md) command: +Add the `Library` project to the `FSharpSample` solution using the [dotnet sln add](../../core/tools/dotnet-sln.md) command. This command adds the project to the solution file so that the solution can track and build it: ```dotnetcli dotnet sln add src/Library/Library.fsproj @@ -109,12 +109,23 @@ let main args = 0 // return an integer exit code ``` -Add a reference to the `Library` project using [dotnet reference add](../../core/tools/dotnet-reference-add.md). +Add a reference to the `Library` project using [dotnet reference add](../../core/tools/dotnet-reference-add.md). This command adds a `` element to the App.fsproj file, which tells the compiler that the App project depends on the Library project: ```dotnetcli dotnet add src/App/App.fsproj reference src/Library/Library.fsproj ``` +The previous command adds the following XML to the App.fsproj file: + +```xml + + + +``` + +> [!TIP] +> If you skip this step and try to build the App project, you'll get a compilation error because the `Library` module won't be found. If this happens, you can either run the `dotnet add reference` command or manually add the `` element shown above to your App.fsproj file. + Add the `App` project to the `FSharpSample` solution using the `dotnet sln add` command: ```dotnetcli From 21a411c3e261b8c838d8df4867a9217f550bd58c Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 08:36:02 -0500 Subject: [PATCH 04/17] Add task expressions definition and link in F# 6 What's New (#49032) * Initial plan * Add task expressions definition and link to documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/fsharp/whats-new/fsharp-6.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/fsharp/whats-new/fsharp-6.md b/docs/fsharp/whats-new/fsharp-6.md index c92ab6c4dfa41..7ce43de85b8ee 100644 --- a/docs/fsharp/whats-new/fsharp-6.md +++ b/docs/fsharp/whats-new/fsharp-6.md @@ -16,7 +16,9 @@ F# 6 is available in all .NET Core distributions and Visual Studio tooling. For ## task {…} -F# 6 includes native support for authoring .NET tasks in F# code. For example, consider the following F# code to create a .NET-compatible task: +F# 6 includes native support for authoring .NET tasks in F# code using [task expressions](../language-reference/task-expressions.md). Task expressions are similar to async expressions but allow you to author .NET tasks directly. + +For example, consider the following F# code to create a .NET-compatible task: ```fsharp let readFilesTask (path1, path2) = From 89c72feb0a364f7ff1fa142e250a18170f2d454b Mon Sep 17 00:00:00 2001 From: Ryan Liu Date: Mon, 13 Oct 2025 06:36:26 -0700 Subject: [PATCH 05/17] Update dependency-injection-guidelines.md to suggest avoid singleton for stateless service (#47991) * Update dependency-injection-guidelines.md to suggest avoid singleton for stateless service Over years I have seen multiple companies use singleton as default IoC scope. So I want to update guide line to make clear what is the cost, suggest at least avoid singleton for stateless service * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/core/extensions/dependency-injection-guidelines.md --------- Co-authored-by: David Pine Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../extensions/dependency-injection-guidelines.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/core/extensions/dependency-injection-guidelines.md b/docs/core/extensions/dependency-injection-guidelines.md index 29ab417a6de92..91cae91385e2b 100644 --- a/docs/core/extensions/dependency-injection-guidelines.md +++ b/docs/core/extensions/dependency-injection-guidelines.md @@ -108,7 +108,7 @@ Register the instance with a scoped lifetime. Use instances with a transient lifetime. Use the factory pattern instead. +- Don't register instances with a transient lifetime. Use the factory pattern instead so the solved service can be manually disposed after it is done being used. - Don't resolve instances with a transient or scoped lifetime in the root scope. The only exception to this is if the app creates/recreates and disposes , but this isn't an ideal pattern. - Receiving an dependency via DI doesn't require that the receiver implement itself. The receiver of the dependency shouldn't call on that dependency. - Use scopes to control the lifetimes of services. Scopes aren't hierarchical, and there's no special connection among scopes. @@ -153,6 +153,15 @@ The factory method of a singleton service, such as the second argument to [AddSi - Avoid calls to when configuring services. Calling `BuildServiceProvider` typically happens when the developer wants to resolve a service when registering another service. Instead, use an overload that includes the `IServiceProvider` for this reason. - [Disposable transient services are captured](#disposable-transient-services-captured-by-container) by the container for disposal. This can turn into a memory leak if resolved from the top-level container. - Enable scope validation to make sure the app doesn't have singletons that capture scoped services. For more information, see [Scope validation](dependency-injection.md#scope-validation). +- Only use singleton lifetime for services with their own state that is expensive to create or globally shared. Avoid using singleton lifetime for services which themselves have no state. Most .NET IoC containers use "Transient" as the default scope. Considerations and drawbacks of singletons: + - **Thread safety**: A singleton must be implemented in a thread-safe way. + - **Coupling**: It can couple otherwise unrelated requests. + - **Testing challenges**: Shared state and coupling can make unit testing more difficult. + - **Memory impact**: A singleton may keep a large object graph alive in memory for the lifetime of the application. + - **Fault tolerance**: If a singleton or any part of its dependency tree fails, it cannot easily recover. + - **Configuration reloading**: Singletons generally cannot support "hot reload" of configuration values. + - **Scope leakage**: A singleton can inadvertently capture scoped or transient dependencies, effectively promoting them to singletons and causing unintended side effects. + - **Initialization overhead**: When resolving a service, the IoC container needs to look up the singleton instance. If it doesn't already exist, it needs to create it in a thread-safe manner. In contrast, a stateless transient service is very cheap to create and destroy. Like all sets of recommendations, you may encounter situations where ignoring a recommendation is required. Exceptions are rare, mostly special cases within the framework itself. From 330c1a319292eb54441ca96a0bd8149b7dc9d912 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 08:36:45 -0500 Subject: [PATCH 06/17] Add documentation for empty/marker interfaces in F# (#49048) * Initial plan * Add documentation for empty/marker interfaces in F# Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Update docs/fsharp/language-reference/interfaces.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Bill Wagner --- docs/fsharp/language-reference/interfaces.md | 10 ++++++++++ samples/snippets/fsharp/lang-ref-1/snippet2806.fs | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 samples/snippets/fsharp/lang-ref-1/snippet2806.fs diff --git a/docs/fsharp/language-reference/interfaces.md b/docs/fsharp/language-reference/interfaces.md index da20bc7f12c2d..513a992d12f86 100644 --- a/docs/fsharp/language-reference/interfaces.md +++ b/docs/fsharp/language-reference/interfaces.md @@ -72,6 +72,16 @@ You can implement one or more interfaces in a class type by using the `interface Interface implementations are inherited, so any derived classes do not need to reimplement them. +## Define empty or marker interfaces + +Empty interfaces, also known as marker interfaces, can be used to identify a set of types without requiring any specific behavior. These interfaces have no members and serve as a way to mark or tag types for categorization purposes. + +You define an empty interface using the `interface end` syntax: + +[!code-fsharp[Main](~/samples/snippets/fsharp/lang-ref-1/snippet2806.fs)] + +In the example above, `IMarker` is defined as an empty interface. Both `MyRecord` and `MyClass` implement this interface without needing to provide any method implementations, since the interface has no members. This allows you to use the interface type to identify and work with these types in a common way. + ## Calling Interface Methods Interface methods can be called only through the interface, not through any object of the type that implements the interface. Thus, you might have to upcast to the interface type by using the `:>` operator or the `upcast` operator in order to call these methods. diff --git a/samples/snippets/fsharp/lang-ref-1/snippet2806.fs b/samples/snippets/fsharp/lang-ref-1/snippet2806.fs new file mode 100644 index 0000000000000..3bbf10d85a8ff --- /dev/null +++ b/samples/snippets/fsharp/lang-ref-1/snippet2806.fs @@ -0,0 +1,13 @@ +// Define an empty interface (also known as a marker interface) +type IMarker = + interface end + +// Implement the empty interface in a record type +type MyRecord = + { Name: string } + interface IMarker + +// Implement the empty interface in a class type +type MyClass(value: int) = + member _.Value = value + interface IMarker From 7aadd0f7a1d1f368e55cfa1d5ae086f8532b689a Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Mon, 13 Oct 2025 09:45:28 -0500 Subject: [PATCH 07/17] Update strong naming guidance for .NET libraries to only apply to applicable platforms (#49026) * Update strong naming guidance for .NET libraries to only apply to applicable platforms Since Strong Naming has no impact on modern .NET Runtimes, limit the scope of guidance to .NET Framework and .NET Standard * Update docs/standard/library-guidance/strong-naming.md Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> * clarify multi-targeting guidelines If multitargeting, strong naming should be done for all TFMs so that InternalsVisibleTo attributes can remain consistent. * fix spacing --------- Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/standard/library-guidance/strong-naming.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index e922903ac103a..429e261886861 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -1,7 +1,7 @@ --- title: Strong naming and .NET libraries description: Best practice recommendations for strong naming .NET libraries. -ms.date: 10/16/2018 +ms.date: 10/13/2025 --- # Strong naming @@ -34,14 +34,18 @@ The benefits of strong naming on .NET Framework are: Strong naming has no benefits on .NET Core/5+. C# compiler produces CS8002 warning for strong-named assemblies referencing non-strong named assemblies. It is fine to suppress this warning for libraries that target .NET Core/5+ only. -## Create strong named .NET libraries +## When to strong name .NET libraries -You should strong name your open-source .NET libraries if their targets include .NET Framework or .NET Standard. Strong naming is not required for libraries that target .NET Core/5+ only. +Strong naming is not required for libraries that target .NET Core/5+ only. You should strong name your open-source .NET libraries if their targets include .NET Framework or .NET Standard. > [!NOTE] > This guidance is specific to publicly distributed .NET libraries, such as .NET libraries published on NuGet.org. Strong naming is not required by most .NET applications and should not be done by default. -✔️ CONSIDER strong naming your library's assemblies. +✔️ CONSIDER strong naming your library's assemblies if you only target .NET Framework or .NET Standard. + +> Strong naming has no impact on modern .NET runtimes. If your library only targets modern .NET, then you don't need to strong name your assemblies. + +> If you multi-target across .NET Framework/.NET Standard _and_ modern .NET, then you should strong name across all of your Target Frameworks. ✔️ CONSIDER adding the strong naming key pair (public + private) to your source control system. From c4f58e5bbab9de5158e0f97b01d28e1b0195a3a0 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 09:25:07 -0700 Subject: [PATCH 08/17] Remove internal JIT and GC stress environment variables from public documentation (#49102) --- .../tools/dotnet-environment-variables.md | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index db7356bfe0974..3791004dd6476 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -111,34 +111,6 @@ The same can be achieved via the environment variable `DOTNET_SYSTEM_NET_HTTP_US > [!NOTE] > Starting in .NET 5, this setting to use is no longer available. -### `DOTNET_Jit*` and `DOTNET_GC*` - -There are two stressing-related features for the JIT and JIT-generated GC information: JIT Stress and GC Hole Stress. These features provide a way during development to discover edge cases and more "real world" scenarios without having to develop complex applications. The following environment variables are available: - -- `DOTNET_JitStress` -- `DOTNET_JitStressModeNamesOnly` -- `DOTNET_GCStress` - -#### JIT stress - -Enabling JIT Stress can be done in several ways. Set `DOTNET_JitStress` to a non-zero integer value to generate varying levels of JIT optimizations based on a hash of the method's name. To apply all optimizations set `DOTNET_JitStress=2`, for example. Another way to enable JIT Stress is by setting `DOTNET_JitStressModeNamesOnly=1` and then requesting the stress modes, space-delimited, in the `DOTNET_JitStressModeNames` variable. - -As an example, consider: - -``` -DOTNET_JitStressModeNames=STRESS_USE_CMOV STRESS_64RSLT_MUL STRESS_LCL_FLDS -``` - -#### GC Hole stress - -Enabling GC Hole Stress causes GCs to always occur in specific locations and that helps to track down GC holes. GC Hole Stress can be enabled using the `DOTNET_GCStress` environment variable. - -For more information, see [Investigating JIT and GC Hole stress](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/investigate-stress.md). - -#### JIT memory barriers - -The code generator for Arm64 allows all `MemoryBarriers` instructions to be removed by setting `DOTNET_JitNoMemoryBarriers` to `1`. - ### `DOTNET_RUNNING_IN_CONTAINER` and `DOTNET_RUNNING_IN_CONTAINERS` The official .NET images (Windows and Linux) set the well-known environment variables: From b0448d70285d2ff686574313627ad3a86b381a19 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 13 Oct 2025 09:47:03 -0700 Subject: [PATCH 09/17] Cleanup .NET implementations lists (#49103) - UWP is not a .NET implementation. Delete it from the .NET implementation lists. - Clarify Mono status. Fixes #47096 Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/core/introduction.md | 4 ++-- docs/fundamentals/implementations.md | 27 ++++++++------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/docs/core/introduction.md b/docs/core/introduction.md index 5dd37fb6c4ba4..2fdcc8d6fcc90 100644 --- a/docs/core/introduction.md +++ b/docs/core/introduction.md @@ -76,9 +76,9 @@ There are multiple variants of .NET, each supporting a different type of app. Th .NET implementations: +* **.NET (Core)** -- Modern .NET. A cross-platform and open source implementation of .NET, rethought for the cloud age while remaining significantly compatible. It is evolving and actively supported. * **.NET Framework** -- The original .NET. It provides access to the broad capabilities of Windows and Windows Server. It is actively supported, in maintenance. -* **Mono** -- The original community and open source .NET. A cross-platform implementation of .NET Framework. Actively supported for Android, iOS, and WebAssembly. -* **.NET (Core)** -- Modern .NET. A cross-platform and open source implementation of .NET, rethought for the cloud age while remaining significantly compatible with .NET Framework. Actively supported for Linux, macOS, and Windows. +* **Mono** -- The original community and open source .NET. A cross-platform implementation of .NET Framework. ## Next steps diff --git a/docs/fundamentals/implementations.md b/docs/fundamentals/implementations.md index f7b59b7e803cf..cf2818024ebcf 100644 --- a/docs/fundamentals/implementations.md +++ b/docs/fundamentals/implementations.md @@ -1,6 +1,6 @@ --- title: .NET implementations -description: Describes the various .NET implementations, including .NET 5+, .NET Framework, Mono, and UWP. +description: Describes the various .NET implementations, including .NET 5+, .NET Framework, and Mono. ms.date: 11/22/2024 ms.custom: updateeachrelease --- @@ -15,20 +15,17 @@ Each implementation of .NET includes the following components: - Optionally, one or more application frameworks—for example, [ASP.NET](https://www.asp.net/), [Windows Forms](/dotnet/desktop/winforms/windows-forms-overview), and [Windows Presentation Foundation (WPF)](/dotnet/desktop/wpf/) are included in .NET Framework and .NET 5+. - Optionally, development tools. Some development tools are shared among multiple implementations. -There are four .NET implementations that Microsoft supports: +There are three main .NET implementations: -- .NET 5 and later versions +- .NET (Core) - .NET Framework - Mono -- UWP -.NET, previously referred to as .NET Core, is currently the primary implementation. .NET (9) is built on a single code base that supports multiple platforms and many workloads, such as Windows desktop apps and cross-platform console apps, cloud services, and websites. [Some workloads](../core/whats-new/dotnet-6.md#sdk-workloads), such as .NET WebAssembly build tools, are available as optional installations. +## .NET (Core) -## .NET 5 and later versions +.NET, previously referred to as .NET Core, is currently the primary implementation. .NET is built on a single code base that supports multiple platforms and many workloads, such as Windows desktop apps and cross-platform console apps, cloud services, and websites. [Some workloads](../core/whats-new/dotnet-6.md#sdk-workloads), such as .NET WebAssembly build tools, are available as optional installations. -.NET, previously referred to as .NET Core, is a cross-platform implementation of .NET that's designed to handle server and cloud workloads at scale. It also supports other workloads, including desktop apps. It runs on Windows, macOS, and Linux. It implements .NET Standard, so code that targets .NET Standard can run on .NET. [ASP.NET Core](https://dotnet.microsoft.com/learn/aspnet/what-is-aspnet-core), [Windows Forms](/dotnet/desktop/winforms/windows-forms-overview), and [Windows Presentation Foundation (WPF)](/dotnet/desktop/wpf/) all run on .NET. - -.NET 9 is the latest version of this .NET implementation. +.NET 9 is the latest version of this .NET implementation. It implements .NET Standard, so code that targets .NET Standard can run on .NET. [ASP.NET Core](https://dotnet.microsoft.com/learn/aspnet/what-is-aspnet-core), [Windows Forms](/dotnet/desktop/winforms/windows-forms-overview), and [Windows Presentation Foundation (WPF)](/dotnet/desktop/wpf/) all run on .NET. For more information, see the following resources: @@ -44,18 +41,10 @@ For more information, see the [.NET Framework guide](../framework/index.yml). ## Mono -Mono is a .NET implementation that is mainly used when a small runtime is required. It is the runtime that powered Xamarin applications (now unsupported) on Android, macOS, iOS, tvOS, and watchOS and is focused primarily on a small footprint. Mono also powers games built using the Unity engine. +The original community and open source .NET. Mono is a cross-platform implementation of .NET Framework. It's the runtime that powered Xamarin applications (now unsupported) on Android, macOS, iOS, tvOS, and watchOS and is focused primarily on a small footprint. Mono also powers games built using the Unity engine. It supports all of the currently published .NET Standard versions. Historically, Mono implemented the larger API of .NET Framework and emulated some of the most popular capabilities on Unix. It is sometimes used to run .NET applications that rely on those capabilities on Unix. -Mono is typically used with a just-in-time compiler, but it also features a full static compiler (ahead-of-time compilation) that is used on platforms like iOS. - -For more information, see the [Mono documentation](https://www.mono-project.com/docs/). - -## Universal Windows Platform (UWP) - -UWP is an implementation of .NET that is used for building modern, touch-enabled Windows applications and software for the Internet of Things (IoT). It's designed to unify the different types of devices that you may want to target, including PCs, tablets, phones, and even the Xbox. UWP provides many services, such as a centralized app store, an execution environment (AppContainer), and a set of Windows APIs to use instead of Win32 (WinRT). Apps can be written in C++, C#, Visual Basic, and JavaScript. - -For more information, see [Introduction to the Universal Windows Platform](/windows/uwp/get-started/universal-application-platform-guide). +For more information, see the [Mono documentation](https://www.mono-project.com/). From 32d6ae4dc162095180eebd161e9834aa22940c32 Mon Sep 17 00:00:00 2001 From: alexwolfmsft <93200798+alexwolfmsft@users.noreply.github.com> Date: Mon, 13 Oct 2025 12:59:31 -0400 Subject: [PATCH 10/17] remove preview (#49115) --- docs/azure/migration/appmod/predefined-tasks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/azure/migration/appmod/predefined-tasks.md b/docs/azure/migration/appmod/predefined-tasks.md index 1f5cf06bfc4ef..765d18d2ac311 100644 --- a/docs/azure/migration/appmod/predefined-tasks.md +++ b/docs/azure/migration/appmod/predefined-tasks.md @@ -1,5 +1,5 @@ --- -title: Predefined tasks for GitHub Copilot app modernization for .NET (Preview) +title: Predefined tasks for GitHub Copilot app modernization for .NET description: Learn about the predefined tasks that are available for GitHub Copilot app modernization for .NET ms.topic: concept-article ms.custom: devx-track-dotnet @@ -8,11 +8,11 @@ author: alexwolfmsft ms.author: alexwolf --- -# Predefined tasks for GitHub Copilot app modernization for .NET (Preview) +# Predefined tasks for GitHub Copilot app modernization for .NET -This article describes the predefined tasks available for GitHub Copilot app modernization for .NET (Preview). +This article describes the predefined tasks available for GitHub Copilot app modernization for .NET. -Predefined tasks capture industry best practices for using Azure services. Currently, App Modernization for .NET (Preview) offers predefined tasks that cover common migration scenarios. These tasks address the following subjects, and more: +Predefined tasks capture industry best practices for using Azure services. Currently, App Modernization for .NET offers predefined tasks that cover common migration scenarios. These tasks address the following subjects, and more: - Database migration - Storage migration From 8b6370324a6c684f10d4cecbb2a78f76ffbde868 Mon Sep 17 00:00:00 2001 From: Theano Petersen Date: Mon, 13 Oct 2025 10:02:42 -0700 Subject: [PATCH 11/17] replace (#49084) --- .../get-started-app-chat-scaling-with-azure-container-apps.md | 2 +- docs/ai/get-started-app-chat-template.md | 4 ++-- docs/ai/how-to/app-service-aoai-auth.md | 2 +- docs/ai/how-to/content-filtering.md | 2 +- docs/azure/create-azure-account.md | 2 +- docs/azure/dotnet-dev-env-checklist.md | 2 +- docs/azure/sdk/resource-management.md | 2 +- docs/core/diagnostics/observability-applicationinsights.md | 2 +- docs/core/extensions/cloud-service.md | 2 +- docs/devops/dotnet-publish-github-action.md | 2 +- docs/fsharp/using-fsharp-on-azure/table-storage.md | 2 +- docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/ai/get-started-app-chat-scaling-with-azure-container-apps.md b/docs/ai/get-started-app-chat-scaling-with-azure-container-apps.md index 52ba3c55d2a97..586277b7518c1 100644 --- a/docs/ai/get-started-app-chat-scaling-with-azure-container-apps.md +++ b/docs/ai/get-started-app-chat-scaling-with-azure-container-apps.md @@ -12,7 +12,7 @@ ms.topic: get-started ## Prerequisites -* Azure subscription. [Create one for free](https://azure.microsoft.com/free/ai-services?azure-portal=true). +* Azure subscription. [Create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). [Dev containers](https://containers.dev/) are available for both samples, with all dependencies required to complete this article. You can run the dev containers in GitHub Codespaces (in a browser) or locally using Visual Studio Code. diff --git a/docs/ai/get-started-app-chat-template.md b/docs/ai/get-started-app-chat-template.md index 7f114fdb387f6..31f349944d96e 100644 --- a/docs/ai/get-started-app-chat-template.md +++ b/docs/ai/get-started-app-chat-template.md @@ -55,13 +55,13 @@ To follow along with this article, you need the following prerequisites: #### [Codespaces (recommended)](#tab/github-codespaces) -* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/ai-services?azure-portal=true) +* An Azure subscription - [Create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn) * Azure account permissions - Your Azure account must have Microsoft.Authorization/roleAssignments/write permissions, such as [User Access Administrator](/azure/role-based-access-control/built-in-roles#user-access-administrator) or [Owner](/azure/role-based-access-control/built-in-roles#owner). * GitHub account #### [Visual Studio Code](#tab/visual-studio-code) -* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/ai-services?azure-portal=true) +* An Azure subscription - [Create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn) * Azure account permissions - Your Azure account must have Microsoft.Authorization/roleAssignments/write permissions, such as [User Access Administrator](/azure/role-based-access-control/built-in-roles#user-access-administrator) or [Owner](/azure/role-based-access-control/built-in-roles#owner). * [Azure Developer CLI](/azure/developer/azure-developer-cli) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) - Start Docker Desktop if it's not already running diff --git a/docs/ai/how-to/app-service-aoai-auth.md b/docs/ai/how-to/app-service-aoai-auth.md index e52ac05dcce95..e2d59308ee9c6 100644 --- a/docs/ai/how-to/app-service-aoai-auth.md +++ b/docs/ai/how-to/app-service-aoai-auth.md @@ -17,7 +17,7 @@ A managed identity from Microsoft Entra ID allows your app to easily access othe ## Prerequisites -* An Azure account that has an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). +* An Azure account that has an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). * [.NET SDK](https://dotnet.microsoft.com/download/visual-studio-sdks) * [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource) * [Create and deploy a .NET application to App Service](/azure/app-service/quickstart-dotnetcore) diff --git a/docs/ai/how-to/content-filtering.md b/docs/ai/how-to/content-filtering.md index f3f875a9790f0..6eb65ca48f9a3 100644 --- a/docs/ai/how-to/content-filtering.md +++ b/docs/ai/how-to/content-filtering.md @@ -16,7 +16,7 @@ The [Content Filtering](/azure/ai-services/openai/concepts/content-filter) docum ## Prerequisites -* An Azure account that has an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). +* An Azure account that has an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). * [.NET SDK](https://dotnet.microsoft.com/download/visual-studio-sdks) * [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource) diff --git a/docs/azure/create-azure-account.md b/docs/azure/create-azure-account.md index 0e8d84480d573..f4a2e6adc466e 100644 --- a/docs/azure/create-azure-account.md +++ b/docs/azure/create-azure-account.md @@ -18,7 +18,7 @@ If you have a Visual Studio subscription, your subscription includes credits for ## Option 2: Sign up for a free Azure account -You can create an [Azure account for free](https://azure.microsoft.com/free/dotnet/) and receive 12 months of popular services for free and a $200 credit to explore Azure for 30 days. +You can create an [Azure account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn) and receive 12 months of popular services for free and a $200 credit to explore Azure for 30 days. ## Option 3: Sign up for a pay-as-you-go account diff --git a/docs/azure/dotnet-dev-env-checklist.md b/docs/azure/dotnet-dev-env-checklist.md index bfb1940bf58fa..1fddce201962b 100644 --- a/docs/azure/dotnet-dev-env-checklist.md +++ b/docs/azure/dotnet-dev-env-checklist.md @@ -15,7 +15,7 @@ This checklist is provided to help you make sure you have your development envir To access Azure services or run applications in Azure, you need an Azure account. * If you are a Visual Studio subscriber, you have monthly [free Azure credits](https://azure.microsoft.com/pricing/member-offers/credit-for-visual-studio-subscribers/) available to you every month -* [Create a free Azure account](https://azure.microsoft.com/free/dotnet/) and receive $200 in credits and select services free for 12 months +* [Create a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn) and receive $200 in credits and select services free for 12 months * Use an account assigned to you by your company's Azure administrator ## Configure your IDE diff --git a/docs/azure/sdk/resource-management.md b/docs/azure/sdk/resource-management.md index a183a093c3277..890b094f7cb5d 100644 --- a/docs/azure/sdk/resource-management.md +++ b/docs/azure/sdk/resource-management.md @@ -24,7 +24,7 @@ Those packages follow the [new Azure SDK guidelines](https://azure.github.io/azu ### Prerequisites -- An [Azure subscription](https://azure.microsoft.com/free/dotnet/). +- An [Azure subscription](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). - A [TokenCredential](/dotnet/api/azure.core.tokencredential?view=azure-dotnet&preserve-view=false) implementation, such as an [Azure Identity library credential type](/dotnet/api/overview/azure/Identity-readme#credential-classes). ### Install the package diff --git a/docs/core/diagnostics/observability-applicationinsights.md b/docs/core/diagnostics/observability-applicationinsights.md index aeba3e4c5fdf9..5cef0fa27df22 100644 --- a/docs/core/diagnostics/observability-applicationinsights.md +++ b/docs/core/diagnostics/observability-applicationinsights.md @@ -39,7 +39,7 @@ The same OTel initialization works for OTLP as for Application Insights, the dif ## 3. Specify the connection string -If you're not already an Azure customer, you can create a free account at [https://azure.microsoft.com/free/](https://azure.microsoft.com/free/). Log in to the Azure Portal, and either select an existing Application Insights resource or create a new one with [https://ms.portal.azure.com/#create/Microsoft.AppInsights](https://ms.portal.azure.com/#create/Microsoft.AppInsights). +If you're not already an Azure customer, you can create a free account at [https://azure.microsoft.com/free/](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). Log in to the Azure Portal, and either select an existing Application Insights resource or create a new one with [https://ms.portal.azure.com/#create/Microsoft.AppInsights](https://ms.portal.azure.com/#create/Microsoft.AppInsights). Application Insights identifies which instance to use to store and process data through an instrumentation key and connection string that are found at the top right side of the portal UI. diff --git a/docs/core/extensions/cloud-service.md b/docs/core/extensions/cloud-service.md index 1860d3c6829e3..083af2c657e34 100644 --- a/docs/core/extensions/cloud-service.md +++ b/docs/core/extensions/cloud-service.md @@ -29,7 +29,7 @@ In this tutorial, you learn how to: - The [.NET 5.0 SDK or later](https://dotnet.microsoft.com/download/dotnet). - Docker Desktop ([Windows](https://docs.docker.com/docker-for-windows/install) or [Mac](https://docs.docker.com/docker-for-mac/install)). -- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/dotnet). +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). - Depending on your developer environment of choice: - [Visual Studio or Visual Studio Code](https://visualstudio.microsoft.com). - [.NET CLI](../tools/index.md) diff --git a/docs/devops/dotnet-publish-github-action.md b/docs/devops/dotnet-publish-github-action.md index 8e1d93d494923..958e3654ffeb2 100644 --- a/docs/devops/dotnet-publish-github-action.md +++ b/docs/devops/dotnet-publish-github-action.md @@ -15,7 +15,7 @@ In this quickstart, you will learn how to create a GitHub workflow to publish yo - A [GitHub account](https://github.com/join). - A .NET source code repository. -- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/dotnet). +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). - An ASP.NET Core web app. - An Azure App Service resource. diff --git a/docs/fsharp/using-fsharp-on-azure/table-storage.md b/docs/fsharp/using-fsharp-on-azure/table-storage.md index f39c7cf0c0c28..c8635469944ed 100644 --- a/docs/fsharp/using-fsharp-on-azure/table-storage.md +++ b/docs/fsharp/using-fsharp-on-azure/table-storage.md @@ -29,7 +29,7 @@ This tutorial shows how to write F# code to do some common tasks using Azure Tab ## Prerequisites -To use this guide, you must first [create an Azure storage account](/azure/storage/storage-create-storage-account) or [Azure Cosmos DB account](https://azure.microsoft.com/free/cosmos-db/). +To use this guide, you must first [create an Azure storage account](/azure/storage/storage-create-storage-account) or [Azure Cosmos DB account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). ## Create an F\# script and start F\# interactive diff --git a/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md b/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md index cfbf1762d130b..5d553584e529e 100644 --- a/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md +++ b/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md @@ -20,7 +20,7 @@ At the end of this quickstart, you have a scalable app running in Azure to provi ## Prerequisites -- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). - [Azure Developer CLI](/azure/developer/azure-developer-cli/install-azd) - [.NET 8](https://dotnet.microsoft.com/download) - [Docker](https://www.docker.com/) From d1bdb50d2cbadcced60a15ff24444945f9a2f2ba Mon Sep 17 00:00:00 2001 From: alexwolfmsft <93200798+alexwolfmsft@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:45:12 -0400 Subject: [PATCH 12/17] clarify project location (#49116) --- docs/ai/quickstarts/build-mcp-server.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/ai/quickstarts/build-mcp-server.md b/docs/ai/quickstarts/build-mcp-server.md index fd38d842aa99a..1be2b31172f34 100644 --- a/docs/ai/quickstarts/build-mcp-server.md +++ b/docs/ai/quickstarts/build-mcp-server.md @@ -66,20 +66,23 @@ Configure GitHub Copilot for Visual Studio Code to use your custom MCP server: "args": [ "run", "--project", - "" + "" ] } } } ``` + > [!NOTE] + > VS Code executes MCP servers from the workspace root. The `` placeholder should point to your .NET project file. For example, the value for this **SampleMcpServer** app would be `SampleMcpServer.csproj`. + 1. Save the file. ## Test the MCP server The MCP server template includes a tool called `get_random_number` you can use for testing and as a starting point for development. -1. Open GitHub Copilot in Visual Studio Code and switch to chat mode. +1. Open GitHub Copilot in Visual Studio Code and switch to agent mode. 1. Select the **Select tools** icon to verify your **SampleMcpServer** is available with the sample tool listed. From 10dd2468b15bf2f5f0b0702c4477a95f1d09578f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Gajo?= <50725287+64J0@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:35:38 -0300 Subject: [PATCH 13/17] [F#] Add FS0410 compiler message (#49100) * Add FS0410 compiler message * Fix ms.date * Fix text * Update docs/fsharp/language-reference/compiler-messages/fs0410.md Co-authored-by: Bill Wagner * Update docs/fsharp/language-reference/compiler-messages/fs0410.md Co-authored-by: Bill Wagner * Update docs/fsharp/language-reference/compiler-messages/fs0410.md Co-authored-by: Bill Wagner * Update docs/fsharp/language-reference/compiler-messages/toc.yml Co-authored-by: Bill Wagner * Update docs/fsharp/language-reference/compiler-messages/fs0410.md Co-authored-by: Bill Wagner --------- Co-authored-by: Bill Wagner --- .../compiler-messages/fs0410.md | 27 +++++++++++++++++++ .../compiler-messages/toc.yml | 2 ++ .../fsharp/compiler-messages/fs0410.fsx | 11 ++++++++ 3 files changed, 40 insertions(+) create mode 100644 docs/fsharp/language-reference/compiler-messages/fs0410.md create mode 100644 samples/snippets/fsharp/compiler-messages/fs0410.fsx diff --git a/docs/fsharp/language-reference/compiler-messages/fs0410.md b/docs/fsharp/language-reference/compiler-messages/fs0410.md new file mode 100644 index 0000000000000..ee7ecefd1415e --- /dev/null +++ b/docs/fsharp/language-reference/compiler-messages/fs0410.md @@ -0,0 +1,27 @@ +--- +description: "Learn more about: FS0410: A type is less accessible than the value, member or type it is used in" +title: "Compiler error FS0410" +ms.date: 10/12/2025 +f1_keywords: + - "FS0410" +helpviewer_keywords: + - "FS0410" +--- + +# FS0410: A type is less accessible than the value, member or type it is used in + +This message is given when you use a type that is less [accessible](../access-control.md) than the value, member or type it is used in. + +For example: + +[!code-fsharp[FS0410-less-accessible-type](~/samples/snippets/fsharp/compiler-messages/fs0410.fsx#L8-L11)] + +Notice that in this example, the type `Person` is `private`, but the function `_getName` is `public`. Also, the function `_getName` uses the type `Person` in its signature, which is not allowed since `Person` is less accessible than `_getName`. + +The example above causes the compiler to display the following message: + +```text +FS0410: The type 'Person' is less accessible than the value, member or type 'val _getName: p: Person.Person -> string' it is used in. +``` + +A workaround would be changing the `Person` type to public accessibility, or the `_getName` function to private accessibility. diff --git a/docs/fsharp/language-reference/compiler-messages/toc.yml b/docs/fsharp/language-reference/compiler-messages/toc.yml index 9e1a0a553ecd1..26f15c48aee91 100644 --- a/docs/fsharp/language-reference/compiler-messages/toc.yml +++ b/docs/fsharp/language-reference/compiler-messages/toc.yml @@ -21,5 +21,7 @@ href: ./fs0052.md - name: FS0067 - This type test or downcast will always hold href: ./fs0067.md + - name: FS0410 - A type is less accessible than the value, member or type it is used in + href: ./fs0410.md - name: FS0703 - Expected type parameter, not unit-of-measure parameter href: ./fs0703.md diff --git a/samples/snippets/fsharp/compiler-messages/fs0410.fsx b/samples/snippets/fsharp/compiler-messages/fs0410.fsx new file mode 100644 index 0000000000000..bc76fabe9be8b --- /dev/null +++ b/samples/snippets/fsharp/compiler-messages/fs0410.fsx @@ -0,0 +1,11 @@ +(* +Compiler error: The type %s is less accessible than the value, member or type %s it is used in + +Notice that in this example, the type Person is private, but the function _getName is public by default. +Also, the function _getName uses the type Person in its signature, which is not allowed since Person is +less accessible than _getName. +*) +module Person = + type private Person = { Name: string; Email: string } + + let _getName (p: Person) = p.Name From 88ba5243c6f4370858921dd41e28b772210c3bef Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Oct 2025 17:17:45 -0700 Subject: [PATCH 14/17] Add warning for untrusted .NET templates (#49074) * Add warning for untrusted .NET templates Added a warning about untrusted .NET templates. * Respond to PR feedback * Apply suggestions from code review Co-authored-by: Meaghan Osagie (Lewis) * Move warning for untrusted .NET templates to description Reinstate warning about untrusted .NET templates. --------- Co-authored-by: Meaghan Osagie (Lewis) --- docs/core/tools/custom-templates.md | 3 +++ docs/core/tools/dotnet-new-install.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/core/tools/custom-templates.md b/docs/core/tools/custom-templates.md index 1e416e93a8182..cb4988c0319e9 100644 --- a/docs/core/tools/custom-templates.md +++ b/docs/core/tools/custom-templates.md @@ -230,6 +230,9 @@ project_folder Use the [dotnet new install](dotnet-new-install.md) command to install a template package. +> [!WARNING] +> Templates can run MSBuild code when triggered, don't install or run untrusted .NET templates. + ### To install a template package from a NuGet package stored at nuget.org Use the NuGet package identifier to install a template package. diff --git a/docs/core/tools/dotnet-new-install.md b/docs/core/tools/dotnet-new-install.md index bcdea99c306d2..604c0d7896a37 100644 --- a/docs/core/tools/dotnet-new-install.md +++ b/docs/core/tools/dotnet-new-install.md @@ -42,6 +42,9 @@ Starting with .NET SDK 6.0.100, installed template packages are available in lat > dotnet new --install Microsoft.Azure.WebJobs.ProjectTemplates > ``` +> [!WARNING] +> Templates can run MSBuild code when triggered, don't install or run untrusted .NET templates. + ## Arguments - **``** From 9a4b0feab1dd6100cb6ff7c66d1e1efdfc2b8a42 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:51:10 -0700 Subject: [PATCH 15/17] Document breaking change: dotnet CLI commands log non-command-relevant data to stderr (#48924) --- docs/core/compatibility/10.0.md | 1 + .../sdk/10.0/dotnet-cli-stderr-output.md | 41 +++++++++++++++++++ docs/core/compatibility/toc.yml | 2 + docs/core/tools/telemetry.md | 5 ++- 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docs/core/compatibility/sdk/10.0/dotnet-cli-stderr-output.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 7d0c66625293f..d709fb69bad3f 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -105,6 +105,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | Title | Type of change | Introduced version | |-------|-------------------|--------------------| | [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 | +| [`dotnet` CLI commands log non-command-relevant data to stderr](sdk/10.0/dotnet-cli-stderr-output.md) | Behavioral change | RC 2 | | [.NET tool packaging creates RuntimeIdentifier-specific tool packages](sdk/10.0/dotnet-tool-pack-publish.md) | Behavioral change | Preview 6 | | [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 | | [`dotnet new sln` defaults to SLNX file format](sdk/10.0/dotnet-new-sln-slnx-default.md) | Behavioral change | RC 1 | diff --git a/docs/core/compatibility/sdk/10.0/dotnet-cli-stderr-output.md b/docs/core/compatibility/sdk/10.0/dotnet-cli-stderr-output.md new file mode 100644 index 0000000000000..efbee406c5626 --- /dev/null +++ b/docs/core/compatibility/sdk/10.0/dotnet-cli-stderr-output.md @@ -0,0 +1,41 @@ +--- +title: "Breaking change - dotnet CLI commands log non-command-relevant data to stderr" +description: "Learn about the breaking change in .NET 10 where some dotnet CLI commands log verbose and non-command-relevant data to stderr instead of stdout." +ms.date: 10/08/2025 +ai-usage: ai-generated +ms.custom: https://dev.azure.com/msft-skilling/Content/_workitems/edit/494515 +--- + +# dotnet CLI commands log non-command-relevant data to stderr + +Starting in .NET 10, some `dotnet` CLI command output that isn't core to the command being invoked emits to `stderr` instead of `stdout`. + +## Version introduced + +.NET 10 RC 2 + +## Previous behavior + +Previously, first-run messages for the `dotnet` CLI emitted to `stdout`. + +## New behavior + +Starting in .NET 10, first-run messages for the `dotnet` CLI emit to `stderr`. (In the future, more messages will undergo a similar change.) + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +Information that's written to `stdout` that isn't directly related to the command being invoked inhibits the use of commands in scripting or noninteractive circumstances. When non-primary outputs like diagnostics, verbose messages, and incidental notifications are moved to `stderr`, `stdout` remains clean for parsing or other interpretation. + +## Recommended action + +For most non-PowerShell users, this change shouldn't require any action. + +For PowerShell users, we recommend using at least PowerShell version 7.2, where redirecting to `stderr` doesn't set PowerShell's `$Error` variable and cause PowerShell to think the previous command failed execution. + +## Affected APIs + +None. diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 18c08be85a233..e34d5f71d71d6 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -114,6 +114,8 @@ items: items: - name: .NET CLI `--interactive` defaults to `true` in user scenarios href: sdk/10.0/dotnet-cli-interactive.md + - name: "`dotnet` CLI commands log non-command-relevant data to stderr" + href: sdk/10.0/dotnet-cli-stderr-output.md - name: .NET tool packaging creates RuntimeIdentifier-specific tool packages href: sdk/10.0/dotnet-tool-pack-publish.md - name: "`dotnet restore` audits transitive packages" diff --git a/docs/core/tools/telemetry.md b/docs/core/tools/telemetry.md index 6fdd8c5bc62a7..55b143f1a9397 100644 --- a/docs/core/tools/telemetry.md +++ b/docs/core/tools/telemetry.md @@ -33,7 +33,10 @@ A single telemetry entry is also sent by the .NET SDK installer when a successfu ## Disclosure -The .NET SDK displays text similar to the following when you first run one of the [.NET CLI commands](index.md) (for example, `dotnet build`). Text may vary slightly depending on the version of the SDK you're running. This "first run" experience is how Microsoft notifies you about data collection. +The .NET SDK displays text similar to the following when you first run one of the [.NET CLI commands](index.md) (for example, `dotnet build`). Text might vary slightly depending on the version of the SDK you're running. This "first run" experience is how Microsoft notifies you about data collection. + +> [!NOTE] +> **Breaking change:** The behavior of telemetry messages written to `stderr` has changed in recent versions of the .NET SDK. For more information, see the [breaking change documentation](/dotnet/core/compatibility/sdk/8.0/telemetry-stderr-behavior). ```console Telemetry From 07678725904aa43e529b9d20f595976c0395e838 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:51:49 -0700 Subject: [PATCH 16/17] Document breaking change: 'dotnet watch' logs to stderr instead of stdout in .NET 10 RC 2 (#48925) --- docs/core/compatibility/10.0.md | 1 + .../sdk/10.0/dotnet-watch-stderr.md | 38 +++++++++++++++++++ docs/core/compatibility/toc.yml | 14 ++++--- 3 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index d709fb69bad3f..ed5ad05cec563 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -112,6 +112,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 | | [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 | | [`dotnet tool install --local` creates manifest by default](sdk/10.0/dotnet-tool-install-local-manifest.md) | Behavioral change | Preview 7 | +| [`dotnet watch` logs to stderr instead of stdout](sdk/10.0/dotnet-watch-stderr.md) | Behavioral change | RC 2 | | [project.json not supported in `dotnet restore`](sdk/10.0/dotnet-restore-project-json-unsupported.md) | Source incompatible | Preview 7 | | [SHA-1 fingerprint support deprecated in `dotnet nuget sign`](sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md) | Behavioral change | Preview 1 | | [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 | diff --git a/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md new file mode 100644 index 0000000000000..36217be0f31fb --- /dev/null +++ b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md @@ -0,0 +1,38 @@ +--- +title: "Breaking change: 'dotnet watch' logs to stderr instead of stdout" +description: "Learn about the breaking change in .NET 10 where 'dotnet watch' emits its internal-facing log messages to stderr instead of stdout." +ms.date: 10/08/2025 +ai-usage: ai-generated +ms.custom: https://github.com/dotnet/docs/issues/45871 +--- +# 'dotnet watch' logs to stderr instead of stdout + +Starting in .NET 10, [`dotnet watch`](../../../tools/dotnet-watch.md) emits its internal-facing log messages to the `stderr` channel instead of `stdout`. This change is part of a general trend towards `dotnet` CLI commands not obscuring the `stdout` channel. That channel is often reserved for special semantics when running certain kinds of applications, like LSP or MCP servers. + +## Version introduced + +.NET 10 RC 2 + +## Previous behavior + +Previously, [`dotnet watch`](../../../tools/dotnet-watch.md) emitted log messages to `stdout`. + +## New behavior + +Starting in .NET 10, [`dotnet watch`](../../../tools/dotnet-watch.md) emits log messages to `stderr`. + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change is part of a general trend towards `dotnet` CLI commands not obscuring the `stdout` channel, which is often reserved or assumed to have special semantics when running certain kinds of applications, like LSP or MCP servers. In general, the .NET CLI should get out of the way of your applications. + +## Recommended action + +Most users shouldn't need to take any action. If you need the `dotnet watch` messages on `stdout`, you can redirect the `stderr` stream to `stdout`. For example, use `2>&1` to redirect the `2` file descriptor for `stderr` to the `1` file descriptor for `stdout`. + +## Affected APIs + +None. diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index e34d5f71d71d6..80d7fdd46d7a0 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -130,6 +130,10 @@ items: href: sdk/10.0/dotnet-package-list-restore.md - name: "`dotnet tool install --local` creates manifest by default" href: sdk/10.0/dotnet-tool-install-local-manifest.md + - name: "`dotnet watch` logs to stderr instead of stdout" + href: sdk/10.0/dotnet-watch-stderr.md + - name: HTTP warnings promoted to errors in package list and search + href: sdk/10.0/http-warnings-to-errors.md - name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed href: sdk/10.0/custom-build-event-warning.md - name: MSBuild custom culture resource handling @@ -138,16 +142,14 @@ items: href: sdk/10.0/nu1510-pruned-references.md - name: NuGet packages with no runtime assets aren't included in deps.json href: sdk/10.0/deps-json-trimmed-packages.md - - name: PackageReference without a version raises error - href: sdk/10.0/nu1015-packagereference-version.md - - name: PrunePackageReference privatizes direct prunable references - href: sdk/10.0/prune-packagereference-privateassets.md - - name: HTTP warnings promoted to errors in package list and search - href: sdk/10.0/http-warnings-to-errors.md - name: NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed href: sdk/10.0/nuget-enhanced-http-retry-removed.md - name: NuGet logs an error for invalid package IDs href: sdk/10.0/nuget-packageid-validation.md + - name: PackageReference without a version raises error + href: sdk/10.0/nu1015-packagereference-version.md + - name: PrunePackageReference privatizes direct prunable references + href: sdk/10.0/prune-packagereference-privateassets.md - name: Windows Forms items: - name: API obsoletions From 806fd6754d3b4247872a19cbdfae6cdf215c374f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 19:18:48 -0700 Subject: [PATCH 17/17] Document breaking change for Type.MakeGenericSignatureType argument validation in .NET 10 Preview 3 (#49124) * Add breaking change documentation for Type.MakeGenericSignatureType argument validation Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> * Address review feedback: rename folder to 10, update issue number, and remove Preview 3 from New behavior section Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/10.0.md | 1 + .../makegeneric-signaturetype-validation.md | 46 +++++++++++++++++++ docs/core/compatibility/toc.yml | 4 ++ 3 files changed, 51 insertions(+) create mode 100644 docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index ed5ad05cec563..da4fdcadf7c9e 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -53,6 +53,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 | | [.NET runtime no longer provides default termination signal handlers](core-libraries/10.0/sigterm-signal-handler.md) | Behavioral change | Preview 5 | | [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 | +| [Type.MakeGenericSignatureType argument validation](reflection/10/makegeneric-signaturetype-validation.md) | Behavioral change | Preview 3 | | [YMM embedded rounding removed from AVX10.2](core-libraries/10.0/ymm-embedded-rounding.md) | Behavioral change | Preview 5 | ## Cryptography diff --git a/docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md b/docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md new file mode 100644 index 0000000000000..95de4af49cc77 --- /dev/null +++ b/docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md @@ -0,0 +1,46 @@ +--- +title: "Breaking change: Type.MakeGenericSignatureType argument validation" +description: Learn about the .NET 10 breaking change in core .NET libraries where Type.MakeGenericSignatureType validates that the genericTypeDefinition argument is a generic type definition. +ms.date: 10/13/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/48902 +--- +# Type.MakeGenericSignatureType argument validation + +Starting in .NET 10, the API validates that the `genericTypeDefinition` argument is a generic type definition. + +## Version introduced + +.NET 10 Preview 3 + +## Previous behavior + +Previously, accepted any type for the `genericTypeDefinition` argument, including non-generic types. + +## New behavior + +Starting in .NET 10, requires the `genericTypeDefinition` argument to be a generic type definition. If the argument is not a generic type definition, the method throws an . + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The type created by had non-sensical behavior when the `genericTypeDefinition` argument was not a generic type definition. + +## Recommended action + +Avoid calling for types that are not generic type definitions. For example: + +```csharp +// Before +Type instantiatedType = Type.MakeGenericSignatureType(originalType, instantiation); + +// After +Type instantiatedType = originalType.IsGenericTypeDefinition ? Type.MakeGenericSignatureType(originalType, instantiation) : originalType; +``` + +## Affected APIs + +- diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 80d7fdd46d7a0..1482d4b9723f2 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -110,6 +110,10 @@ items: href: networking/10.0/default-http-streaming.md - name: "'Uri' length limits removed" href: networking/10.0/uri-length-limits-removed.md + - name: Reflection + items: + - name: Type.MakeGenericSignatureType argument validation + href: reflection/10/makegeneric-signaturetype-validation.md - name: SDK and MSBuild items: - name: .NET CLI `--interactive` defaults to `true` in user scenarios