diff --git a/docs/core/extensions/dependency-injection-basics.md b/docs/core/extensions/dependency-injection-basics.md index 0bf9d03c8aed7..87d3063602351 100644 --- a/docs/core/extensions/dependency-injection-basics.md +++ b/docs/core/extensions/dependency-injection-basics.md @@ -20,7 +20,7 @@ To get started, create a new .NET console application named **DI.Basics**. Some - [Visual Studio: **File > New > Project**](/visualstudio/get-started/csharp/tutorial-console) menu. - [Visual Studio Code](https://code.visualstudio.com/) and the [C# Dev Kit extension's](https://code.visualstudio.com/docs/csharp/project-management): **Solution Explorer** menu option. -- [.NET CLI: `dotnet new console`](/dotnet/core/tools/dotnet-new-sdk-templates#console) command in the terminal. +- [.NET CLI: `dotnet new console`](../tools/dotnet-new-sdk-templates.md#console) command in the terminal. You need to add the package reference to the [Microsoft.Extensions.DependencyInjection](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection) in the project file. Regardless of the approach, ensure the project resembles the following XML of the _DI.Basics.csproj_ file: diff --git a/docs/csharp/how-to/index.md b/docs/csharp/how-to/index.md index c8adc25d2bfc2..702042420c230 100644 --- a/docs/csharp/how-to/index.md +++ b/docs/csharp/how-to/index.md @@ -92,7 +92,7 @@ Events provide a mechanism to publish or subscribe to notifications. - [Subscribe and unsubscribe from events](../programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md). - [Implement events declared in interfaces](../programming-guide/events/how-to-implement-interface-events.md). -- [Conform to .NET guidelines when your code publishes events](../programming-guide/events/how-to-publish-events-that-conform-to-net-framework-guidelines.md). +- [Conform to .NET guidelines when your code publishes events](/dotnet/standard/events). - [Raise events defined in base classes from derived classes](../programming-guide/events/how-to-raise-base-class-events-in-derived-classes.md). - [Implement custom event accessors](../programming-guide/events/how-to-implement-custom-event-accessors.md). diff --git a/docs/csharp/language-reference/keywords/event.md b/docs/csharp/language-reference/keywords/event.md index b1143baba83b0..381b2f3170e20 100644 --- a/docs/csharp/language-reference/keywords/event.md +++ b/docs/csharp/language-reference/keywords/event.md @@ -17,7 +17,7 @@ The `event` keyword is used to declare an event in a publisher class. ## Example -The following example shows how to declare and raise an event that uses as the underlying delegate type. For the complete code example that also shows how to use the generic delegate type and how to subscribe to an event and create an event handler method, see [How to publish events that conform to .NET Guidelines](../../programming-guide/events/how-to-publish-events-that-conform-to-net-framework-guidelines.md). +The following example shows how to declare and raise an event that uses as the underlying delegate type. For the complete code example that also shows how to use the generic delegate type and how to subscribe to an event and create an event handler method, see [How to publish events that conform to .NET Guidelines](/dotnet/standard/events). [!code-csharp[csrefKeywordsModifiers#7](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsModifiers/CS/csrefKeywordsModifiers.cs#7)] diff --git a/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md b/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md index 4fc11bf35a5e9..6cc5f9d2b33c7 100644 --- a/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md +++ b/docs/csharp/programming-guide/events/how-to-subscribe-to-and-unsubscribe-from-events.md @@ -93,6 +93,6 @@ You cannot easily unsubscribe from an event if you used an anonymous function to - [Events](./index.md) - [event](../../language-reference/keywords/event.md) -- [How to publish events that conform to .NET Guidelines](./how-to-publish-events-that-conform-to-net-framework-guidelines.md) +- [How to publish events that conform to .NET Guidelines](/dotnet/standard/events) - [- and -= operators](../../language-reference/operators/subtraction-operator.md) - [+ and += operators](../../language-reference/operators/addition-operator.md) diff --git a/docs/csharp/programming-guide/events/index.md b/docs/csharp/programming-guide/events/index.md index 53881884766b7..6f18cccb65f5c 100644 --- a/docs/csharp/programming-guide/events/index.md +++ b/docs/csharp/programming-guide/events/index.md @@ -36,7 +36,7 @@ In a typical C# Windows Forms or Web application, you subscribe to events raised - [How to subscribe to and unsubscribe from events](./how-to-subscribe-to-and-unsubscribe-from-events.md) -- [How to publish events that conform to .NET Guidelines](./how-to-publish-events-that-conform-to-net-framework-guidelines.md) +- [How to publish events that conform to .NET Guidelines](/dotnet/standard/events) - [How to raise base class events in derived classes](./how-to-raise-base-class-events-in-derived-classes.md) diff --git a/docs/standard/serialization/binaryformatter-migration-guide/functionality-reference.md b/docs/standard/serialization/binaryformatter-migration-guide/functionality-reference.md index 17b40ae7bfa77..817cb923b350e 100644 --- a/docs/standard/serialization/binaryformatter-migration-guide/functionality-reference.md +++ b/docs/standard/serialization/binaryformatter-migration-guide/functionality-reference.md @@ -24,7 +24,7 @@ In most common scenario, the type is annotated with `[Serializable]` and the ser ### C# auto properties -For C# [auto-implemented properties](/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties) (`{ get; set; }`), BinaryFormatter will serialize the backing fields that are generated by the C# compiler, not the properties. The names of those serialized backing fields contain illegal C# characters and cannot be controlled. A C# decompiler (such as [https://sharplab.io/](https://sharplab.io/) or [ILSpy](https://github.com/icsharpcode/ILSpy)) can demonstrate how C# auto properties are presented to the runtime. +For C# [auto-implemented properties](../../../csharp/programming-guide/classes-and-structs/auto-implemented-properties.md) (`{ get; set; }`), BinaryFormatter will serialize the backing fields that are generated by the C# compiler, not the properties. The names of those serialized backing fields contain illegal C# characters and cannot be controlled. A C# decompiler (such as [https://sharplab.io/](https://sharplab.io/) or [ILSpy](https://github.com/icsharpcode/ILSpy)) can demonstrate how C# auto properties are presented to the runtime. ```csharp [Serializable] diff --git a/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md b/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md index 9ad1faaebac6b..f129e3b28392e 100644 --- a/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md +++ b/docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md @@ -13,7 +13,7 @@ helpviewer_keywords: ## BinaryFormatter removal -Starting with .NET 9, [BinaryFormatter] is no longer supported due to its known [security risks](/dotnet/standard/serialization/binaryformatter-security-guide) and its APIs always throw a for all project types, including Windows Forms apps. For more information about the risks BinaryFormatter poses and the reason for its removal, see the [BinaryFormatter migration guide](index.md). +Starting with .NET 9, [BinaryFormatter] is no longer supported due to its known [security risks](../binaryformatter-security-guide.md) and its APIs always throw a for all project types, including Windows Forms apps. For more information about the risks BinaryFormatter poses and the reason for its removal, see the [BinaryFormatter migration guide](index.md). With BinaryFormatter's removal, it's expected that many Windows Forms applications will be impacted, and you'll need to take action to complete your migration to .NET 9 or a later version. @@ -91,7 +91,7 @@ For types that aren't intrinsically handled during serialization into resources, .NET 9 users who can't migrate away from [BinaryFormatter] can install an unsupported compatibility package. For more information, see [BinaryFormatter migration guide: Compatibility Package](compatibility-package.md). > [!CAUTION] -> BinaryFormatter is dangerous and not recommended as it puts consuming apps at risk for attacks such as denial of service (DoS), information disclosure, or remote code execution. For more information about the risks [BinaryFormatter] poses, see [Deserialization risks in use of BinaryFormatter and related types](/dotnet/standard/serialization/binaryformatter-security-guide). +> BinaryFormatter is dangerous and not recommended as it puts consuming apps at risk for attacks such as denial of service (DoS), information disclosure, or remote code execution. For more information about the risks [BinaryFormatter] poses, see [Deserialization risks in use of BinaryFormatter and related types](../binaryformatter-security-guide.md). ## Issues diff --git a/docs/standard/serialization/binaryformatter-migration-guide/wpf-applications.md b/docs/standard/serialization/binaryformatter-migration-guide/wpf-applications.md index e0a0e707bf8fc..0964b67785764 100644 --- a/docs/standard/serialization/binaryformatter-migration-guide/wpf-applications.md +++ b/docs/standard/serialization/binaryformatter-migration-guide/wpf-applications.md @@ -12,7 +12,7 @@ helpviewer_keywords: ## BinaryFormatter removal -Starting with .NET 9, [BinaryFormatter] is no longer supported due to its known [security risks](/dotnet/standard/serialization/binaryformatter-security-guide) and its APIs always throw a for all project types, including WPF apps. For more information about the risks [BinaryFormatter] poses and the reason for its removal, see the [BinaryFormatter migration guide](index.md). +Starting with .NET 9, [BinaryFormatter] is no longer supported due to its known [security risks](../binaryformatter-security-guide.md) and its APIs always throw a for all project types, including WPF apps. For more information about the risks [BinaryFormatter] poses and the reason for its removal, see the [BinaryFormatter migration guide](index.md). With [BinaryFormatter]’s removal, it's expected that many WPF applications will be impacted, and you'll need to take action to complete your migration to .NET 9 or a later version. @@ -64,7 +64,7 @@ Ref: [DataStream.cs](https://github.com/dotnet/wpf/blob/4e977f5fe8c73094ee5826db .NET 9 users who can't migrate away from [BinaryFormatter] can install an unsupported compatibility package. For more information, see [BinaryFormatter migration guide: Compatibility Package](compatibility-package.md). > [!CAUTION] -> [BinaryFormatter] is dangerous and not recommended as it puts consuming apps at risk for attacks such as denial of service (DoS), information disclosure, or remote code execution. For more information about the risks [BinaryFormatter] poses, see [Deserialization risks in use of BinaryFormatter and related types](/dotnet/standard/serialization/binaryformatter-security-guide). +> [BinaryFormatter] is dangerous and not recommended as it puts consuming apps at risk for attacks such as denial of service (DoS), information disclosure, or remote code execution. For more information about the risks [BinaryFormatter] poses, see [Deserialization risks in use of BinaryFormatter and related types](../binaryformatter-security-guide.md). ### Issues