From fb84e60d8b0f419003c70632f8cb81c58c169d9e Mon Sep 17 00:00:00 2001 From: Megha Anand <88059806+anandmeg@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:22:21 -0700 Subject: [PATCH 1/4] Address UUF on confusion around namespace --- docs/get-started/csharp/tutorial-console-part-2.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/get-started/csharp/tutorial-console-part-2.md b/docs/get-started/csharp/tutorial-console-part-2.md index cc9fba18509..ca430d96457 100644 --- a/docs/get-started/csharp/tutorial-console-part-2.md +++ b/docs/get-started/csharp/tutorial-console-part-2.md @@ -2,7 +2,7 @@ title: "Tutorial 2: Extend your C# console app" description: Extend a C# console application in Visual Studio, including debugging features, managing multiple projects, and referencing third-party packages. ms.custom: vs-acquisition -ms.date: 09/05/2024 +ms.date: 10/18/2024 ms.subservice: general-ide ms.topic: tutorial ms.devlang: csharp @@ -232,14 +232,10 @@ In Visual Studio, you use the menu command **File** > **Add** > **New Project** using CalculatorLibrary; ``` - Adding the `using` directive should let you remove the `CalculatorLibrary` namespace from the call site, but now there's an ambiguity. Is `Calculator` the class in `CalculatorLibrary`, or is `Calculator` the namespace? - - To resolve the ambiguity, rename the namespace from `Calculator` to `CalculatorProgram` in *Program.cs*. + Adding the `using` directive should let you remove the `CalculatorLibrary` namespace from the call site. - ```csharp - // Program.cs - namespace CalculatorProgram - ``` + If your `Program.cs` code is in the `Calculator` namespace, rename the namespace from `Calculator` to `CalculatorProgram` to remove ambiguity between class name and namespace name. + ::: moniker-end ## Reference .NET libraries: Write to a log From 78becf7840072af564d51ce6356d28471433a374 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DOCS)" Date: Tue, 22 Oct 2024 09:08:51 -0700 Subject: [PATCH 2/4] Clarify usage scenario for DebuggerDisplay --- docs/debugger/using-the-debuggerdisplay-attribute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/debugger/using-the-debuggerdisplay-attribute.md b/docs/debugger/using-the-debuggerdisplay-attribute.md index 9e9bc49829f..55ba9dd4d2d 100644 --- a/docs/debugger/using-the-debuggerdisplay-attribute.md +++ b/docs/debugger/using-the-debuggerdisplay-attribute.md @@ -14,7 +14,7 @@ ms.subservice: debug-diagnostics --- # Tell the debugger what to show using the DebuggerDisplay Attribute (C#, Visual Basic, F#, C++/CLI) -The controls how an object, property, or field is displayed in the debugger variable windows. This attribute can be applied to types (classes, structs, enums, delegates). If applied to a base type, the attribute also applies to a subclass. +The controls how an object, property, or field is displayed in the debugger variable windows. This attribute can be applied to types (classes, structs, enums, delegates), but is typically applied only to classes and structs. If applied to a base type, the attribute also applies to a subclass. The `DebuggerDisplay` attribute has a single argument, which is a string to be displayed in the value column for instances of the type. This string can contain braces (`{` and `}`). Text within a pair of braces is evaluated as a field, property or method. From a72b55004fa9b90aaf65a3a7636a53400c4f1b9a Mon Sep 17 00:00:00 2001 From: "Mike Jones (DOCS)" Date: Tue, 22 Oct 2024 09:43:30 -0700 Subject: [PATCH 3/4] Clarify trust prompt behavior for ClickOnce --- .../how-to-configure-the-clickonce-trust-prompt-behavior.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md b/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md index 5128a181ef3..d34a75a79f8 100644 --- a/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md +++ b/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md @@ -27,8 +27,8 @@ You can configure the ClickOnce trust prompt to control whether end users are gi |Option|Registry setting value|Description| |------------|----------------------------|-----------------| |Enable the trust prompt.|`Enabled`|The ClickOnce trust prompt is displayed so that end users can grant trust to ClickOnce applications.| -|Restrict the trust prompt.|`AuthenticodeRequired`|The ClickOnce trust prompt is only displayed if ClickOnce applications are signed with a certificate that identifies the publisher.| -|Disable the trust prompt.|`Disabled`|The ClickOnce trust prompt is not displayed for any ClickOnce applications that are not signed with an explicitly trusted certificate.| +|Restrict the trust prompt.|`AuthenticodeRequired`|The ClickOnce trust prompt is only displayed if ClickOnce applications are signed with a certificate that identifies the publisher. Otherwise, the ClickOnce application will not be installed.| +|Disable the trust prompt.|`Disabled`|The ClickOnce trust prompt is not displayed. Only ClickOnce applications that are signed with an explicitly trusted certificate will be installed.| The following table shows the default behavior for each zone. The Applications column refers to Windows Forms applications, Windows Presentation Foundation applications, WPF browser applications, and console applications. From 31d1b1d3def1d060f709ef2e5cc9d3941c001a45 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DOCS)" Date: Tue, 22 Oct 2024 16:33:35 -0700 Subject: [PATCH 4/4] edits --- ...gure-the-clickonce-trust-prompt-behavior.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md b/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md index d34a75a79f8..a2c367b0917 100644 --- a/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md +++ b/docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md @@ -27,8 +27,8 @@ You can configure the ClickOnce trust prompt to control whether end users are gi |Option|Registry setting value|Description| |------------|----------------------------|-----------------| |Enable the trust prompt.|`Enabled`|The ClickOnce trust prompt is displayed so that end users can grant trust to ClickOnce applications.| -|Restrict the trust prompt.|`AuthenticodeRequired`|The ClickOnce trust prompt is only displayed if ClickOnce applications are signed with a certificate that identifies the publisher. Otherwise, the ClickOnce application will not be installed.| -|Disable the trust prompt.|`Disabled`|The ClickOnce trust prompt is not displayed. Only ClickOnce applications that are signed with an explicitly trusted certificate will be installed.| +|Restrict the trust prompt.|`AuthenticodeRequired`|The ClickOnce trust prompt is only displayed if ClickOnce applications are signed with a certificate that identifies the publisher. Otherwise, the ClickOnce application won't be installed.| +|Disable the trust prompt.|`Disabled`|The ClickOnce trust prompt isn't displayed. Only ClickOnce applications that are signed with an explicitly trusted certificate will be installed.| The following table shows the default behavior for each zone. The Applications column refers to Windows Forms applications, Windows Presentation Foundation applications, WPF browser applications, and console applications. @@ -57,9 +57,9 @@ You can configure the ClickOnce trust prompt to control whether end users are gi **\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\\.NETFramework\Security\TrustManager\PromptingLevel** - If the key does not exist, create it. + If the key doesn't exist, create it. -3. Add the following subkeys as **String Value**, if they do not already exist, with the associated values shown in the following table. +3. Add the following subkeys as **String Value**, if they don't already exist, with the associated values shown in the following table. |String Value subkey|Value| |-------------------------|-----------| @@ -119,9 +119,9 @@ You can configure the ClickOnce trust prompt to control whether end users are gi **\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\\.NETFramework\Security\TrustManager\PromptingLevel** - If the key does not exist, create it. + If the key doesn't exist, create it. -3. Add the following subkeys as **String Value**, if they do not already exist, with the associated values shown in the following table. +3. Add the following subkeys as **String Value**, if they don't already exist, with the associated values shown in the following table. |String Value subkey|Value| |-------------------------|-----------| @@ -165,7 +165,7 @@ You can configure the ClickOnce trust prompt to control whether end users are gi 3. Build and run the application. ## Disable the ClickOnce trust prompt - You can disable the trust prompt so that end users are not given the option to install solutions that are not already trusted in their security policy. + You can disable the trust prompt so that end users aren't given the option to install solutions that aren't already trusted in their security policy. #### To disable the ClickOnce trust prompt by using the registry editor @@ -179,9 +179,9 @@ You can configure the ClickOnce trust prompt to control whether end users are gi **\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\\.NETFramework\Security\TrustManager\PromptingLevel** - If the key does not exist, create it. + If the key doesn't exist, create it. -3. Add the following subkeys as **String Value**, if they do not already exist, with the associated values shown in the following table. +3. Add the following subkeys as **String Value**, if they don't already exist, with the associated values shown in the following table. |String Value subkey|Value| |-------------------------|-----------|