Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/xml-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The following table describes the tags for use inside description sections:
### User-defined tags

The previous tags represent those that are recognized by the F# compiler and typical F# editor tooling. However, a user is free to define their own tags.
Tools like fsdocs bring support for extra tags like [\<namespacedoc>](https://github.com/fsharp/fslang-design/blob/main/tooling/FST-1031-xmldoc-extensions.md).
Tools like fsdocs bring support for extra tags like [`<namespacedoc>`](https://github.com/fsharp/fslang-design/blob/main/tooling/FST-1031-xmldoc-extensions.md).
Custom or in-house documentation generation tools can also be used with the standard tags and multiple output formats from HTML to PDF can be supported.

## Compile-time checking
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/code-analysis/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For additional options, see [Code analysis properties](../../core/project-sdk/ms

### Analysis mode

While the .NET SDK includes all code analysis rules, only some of them are [enabled by default](https://github.com/dotnet/roslyn-analyzers/blob/main/src/NetAnalyzers/Core/AnalyzerReleases.Shipped.md). The *analysis mode* determines which, if any, set of rules to enable. You can choose a more aggressive analysis mode where most or all rules are enabled. Or you can choose a more conservative analysis mode where most or all rules are disabled, and you can then opt-in to specific rules as needed. Set your analysis mode by adding the [\<AnalysisMode>](../../core/project-sdk/msbuild-props.md#analysismode) MSBuild property to your project file.
While the .NET SDK includes all code analysis rules, only some of them are [enabled by default](https://github.com/dotnet/roslyn-analyzers/blob/main/src/NetAnalyzers/Core/AnalyzerReleases.Shipped.md). The *analysis mode* determines which, if any, set of rules to enable. You can choose a more aggressive analysis mode where most or all rules are enabled. Or you can choose a more conservative analysis mode where most or all rules are disabled, and you can then opt-in to specific rules as needed. Set your analysis mode by adding the [`<AnalysisMode>`](../../core/project-sdk/msbuild-props.md#analysismode) MSBuild property to your project file.

```xml
<PropertyGroup>
Expand Down Expand Up @@ -116,7 +116,7 @@ The following table shows the different rule severities that you can configure f
```

> [!IMPORTANT]
> When you configure the severity level for multiple rules with a single entry, either for a *category* of rules or for *all* rules, the severity only applies to rules that are [enabled by default](https://github.com/dotnet/roslyn-analyzers/blob/main/src/NetAnalyzers/Core/AnalyzerReleases.Shipped.md). And if you enable all rules by using the MSBuild properties [\<AnalysisMode>](../../core/project-sdk/msbuild-props.md#analysismode) or [\<AnalysisLevel>](../../core/project-sdk/msbuild-props.md#analysislevel), any bulk `dotnet_analyzer_diagnostic` options are ignored. For this reason, it's better to enable a category of rules by setting [\<AnalysisMode\<Category>>](../../core/project-sdk/msbuild-props.md#analysismodecategory) to `All`.
> When you configure the severity level for multiple rules with a single entry, either for a *category* of rules or for *all* rules, the severity only applies to rules that are [enabled by default](https://github.com/dotnet/roslyn-analyzers/blob/main/src/NetAnalyzers/Core/AnalyzerReleases.Shipped.md). And if you enable all rules by using the MSBuild properties [`<AnalysisMode>`](../../core/project-sdk/msbuild-props.md#analysismode) or [`<AnalysisLevel>`](../../core/project-sdk/msbuild-props.md#analysislevel), any bulk `dotnet_analyzer_diagnostic` options are ignored. For this reason, it's better to enable a category of rules by setting [\<AnalysisMode\<Category>>](../../core/project-sdk/msbuild-props.md#analysismodecategory) to `All`.

> [!NOTE]
> The prefix for setting severity for a single rule, `dotnet_diagnostic`, is slightly different than the prefix for configuring severity via category or for all rules, `dotnet_analyzer_diagnostic`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ or

If you're using the .NET 8 SDK or an earlier version and you want the severity to be respected at build time, you can do so in one of two ways:

- Set the [\<AnalysisLevel>](../../../core/project-sdk/msbuild-props.md#analysislevel) or `<AnalysisLevelStyle>` property to `9.0` or higher, or to `preview`.
- Set the [`<AnalysisLevel>`](../../../core/project-sdk/msbuild-props.md#analysislevel) or `<AnalysisLevelStyle>` property to `9.0` or higher, or to `preview`.
- Set the severity by using the rule ID-based severity configuration syntax for analyzers instead. The syntax takes the form `dotnet_diagnostic.<rule ID>.severity = <severity>`, for example, `dotnet_diagnostic.IDE0040.severity = warning`. For more information, see [severity level](../configuration-options.md#severity-level).

> [!TIP]
Expand Down
8 changes: 4 additions & 4 deletions docs/fundamentals/code-analysis/style-rules/naming-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ Each property should only be set once, but some settings allow multiple, comma-s

The order of the properties is not important.

## \<kind> values
## `<kind>` values

**\<kind>** specifies which kind of entity is being defined&mdash;naming rule, symbol group, or naming style&mdash;and must be one of the following:

| To set a property for | Use the \<kind> value | Example |
| To set a property for | Use the `<kind>` value | Example |
| --- | --- | -- |
| Naming rule | `dotnet_naming_rule` | `dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion` |
| Symbol group | `dotnet_naming_symbols` | `dotnet_naming_symbols.interface.applicable_kinds = interface` |
| Naming style | `dotnet_naming_style` | `dotnet_naming_style.pascal_case.capitalization = pascal_case` |

## \<entityName>
## `<entityName>`

**\<entityName>** is a descriptive name you choose that associates multiple property settings into a single definition. For example, the following properties produce two symbol group definitions, `interface` and `types`, each of which has two properties set on it.

Expand All @@ -62,7 +62,7 @@ dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, d
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
```

## \<propertyName> and \<propertyValue>
## `<propertyName>` and `<propertyValue>`

Each kind of entity&mdash;[naming rule](#naming-rule-properties), [symbol group](#symbol-group-properties), or [naming style](#naming-style-properties)&mdash;has its own supported properties, as described in the following sections.

Expand Down
10 changes: 5 additions & 5 deletions docs/fundamentals/runtime-libraries/system-appcontext.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ It's beneficial to use a consistent format for switch names, since they're a for
- *Switch*.*namespace*.*switchname*
- *Switch*.*library*.*switchname*

Once you define and document the switch, callers can use it by calling the <xref:System.AppContext.SetSwitch%28System.String%2CSystem.Boolean%29?displayProperty=nameWithType> method programmatically. .NET Framework apps can also use the switch by adding an [\<AppContextSwitchOverrides>](../../framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md) element to their application configuration file or by using the registry. For more information about how callers use and set the value of <xref:System.AppContext> configuration switches, see the [AppContext for library consumers](#appcontext-for-library-consumers) section.
Once you define and document the switch, callers can use it by calling the <xref:System.AppContext.SetSwitch%28System.String%2CSystem.Boolean%29?displayProperty=nameWithType> method programmatically. .NET Framework apps can also use the switch by adding an [`<AppContextSwitchOverrides>`](../../framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md) element to their application configuration file or by using the registry. For more information about how callers use and set the value of <xref:System.AppContext> configuration switches, see the [AppContext for library consumers](#appcontext-for-library-consumers) section.

In .NET Framework, when the common language runtime runs an application, it automatically reads the registry's compatibility settings and loads the application configuration file to populate the application's <xref:System.AppContext> instance. Because the <xref:System.AppContext> instance is populated either programmatically by the caller or by the runtime, .NET Framework apps don't have to take any action, such as calling the <xref:System.AppContext.SetSwitch%2A> method, to configure the <xref:System.AppContext> instance.

Expand Down Expand Up @@ -90,9 +90,9 @@ You can set the value of a switch by calling the <xref:System.AppContext.SetSwit

.NET Framework apps have additional ways to set the value of a switch:

- By adding an `<AppContextSwitchOverrides>` element to the [\<runtime>](../../framework/configure-apps/file-schema/runtime/runtime-element.md) section of the app.config file. The switch has a single attribute, `value`, whose value is a string that represents a key/value pair containing both the switch name and its value.
- By adding an `<AppContextSwitchOverrides>` element to the [`<runtime>`](../../framework/configure-apps/file-schema/runtime/runtime-element.md) section of the app.config file. The switch has a single attribute, `value`, whose value is a string that represents a key/value pair containing both the switch name and its value.

To define multiple switches, separate each switch's key/value pair in the [\<AppContextSwitchOverrides>](../../framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md) element's `value` attribute with a semicolon. In that case, the `<AppContextSwitchOverrides>` element has the following format:
To define multiple switches, separate each switch's key/value pair in the [`<AppContextSwitchOverrides>`](../../framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md) element's `value` attribute with a semicolon. In that case, the `<AppContextSwitchOverrides>` element has the following format:

```xml
<AppContextSwitchOverrides value="switchName1=value1;switchName2=value2" />
Expand All @@ -101,15 +101,15 @@ You can set the value of a switch by calling the <xref:System.AppContext.SetSwit
Using the `<AppContextSwitchOverrides>` element to define a configuration setting has application scope; that is, it affects only the application.

> [!NOTE]
> For information on the switches defined by .NET Framework, see [\<AppContextSwitchOverrides> element](../../framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md).
> For information on the switches defined by .NET Framework, see [`<AppContextSwitchOverrides>` element](../../framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md).

- By adding an entry to the registry. Add a new string value to the **HKLM\SOFTWARE\Microsoft\\.NETFramework\AppContext** subkey. Set the name of the entry to the name of the switch. Set its value to one of the following options: `True`, `true`, `False`, or `false`. If the runtime encounters any other value, it ignores the switch.

On a 64-bit operating system, you must also add the same entry to the **HKLM\SOFTWARE\Wow6432Node\Microsoft\\.NETFramework\AppContext** subkey.

Using the registry to define an <xref:System.AppContext> switch has machine scope; that is, it affects every application running on the machine.

For ASP.NET and ASP.NET Core applications, you set a switch by adding an [\<Add>](../../framework/configure-apps/file-schema/appsettings/add-element-for-appsettings.md) element to the [\<appSettings>](../../framework/configure-apps/file-schema/appsettings/index.md) section of the web.config file. For example:
For ASP.NET and ASP.NET Core applications, you set a switch by adding an [`<Add>`](../../framework/configure-apps/file-schema/appsettings/add-element-for-appsettings.md) element to the [`<appSettings>`](../../framework/configure-apps/file-schema/appsettings/index.md) section of the web.config file. For example:

```xml
<appSettings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Because the main assembly that contains an app's default resources is separate f

For more information about versioning support for satellite assemblies, see the article [Retrieving Resources](/dotnet/framework/resources/retrieving-resources-in-desktop-apps).

### \<satelliteassemblies> configuration file node
### `<satelliteassemblies>` configuration file node

> [!NOTE]
> This section is specific to .NET Framework apps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ When you update the main assembly, you increment its assembly version number. Ho

If you want to revise a satellite assembly but not the main assembly, increment the version number on your satellite. In this case, ship a publisher policy assembly along with your satellite assembly stating that your new satellite assembly has backward compatibility with your old satellite assembly. The resource manager will still use the old contract number written into your main assembly based on the <xref:System.Resources.SatelliteContractVersionAttribute> attribute; however, the loader will bind to the satellite assembly version that is specified by the policy assembly.

A vendor of a shared component uses a publisher policy assembly to make a compatibility statement about a particular version of a released assembly. A publisher policy assembly is a strongly named assembly that has a name in the format `policy.<major>.<minor>.<ComponentAssemblyName>`, and is registered in the [Global Assembly Cache (GAC)](../../framework/app-domains/gac.md). The publisher policy is generated from an XML configuration file (see the [\<bindingRedirect> Element](../../framework/configure-apps/file-schema/runtime/bindingredirect-element.md)) by using the [Al.exe (Assembly Linker)](../../framework/tools/al-exe-assembly-linker.md) tool. The Assembly Linker is used with the `/link` option to link the XML configuration file to a manifest assembly, which is then stored in the global assembly cache. The publisher policy assemblies can be used when a vendor ships a maintenance release (service pack) that contains bug fixes.
A vendor of a shared component uses a publisher policy assembly to make a compatibility statement about a particular version of a released assembly. A publisher policy assembly is a strongly named assembly that has a name in the format `policy.<major>.<minor>.<ComponentAssemblyName>`, and is registered in the [Global Assembly Cache (GAC)](../../framework/app-domains/gac.md). The publisher policy is generated from an XML configuration file (see the [`<bindingRedirect>` Element](../../framework/configure-apps/file-schema/runtime/bindingredirect-element.md)) by using the [Al.exe (Assembly Linker)](../../framework/tools/al-exe-assembly-linker.md) tool. The Assembly Linker is used with the `/link` option to link the XML configuration file to a manifest assembly, which is then stored in the global assembly cache. The publisher policy assemblies can be used when a vendor ships a maintenance release (service pack) that contains bug fixes.

## Windows 8.x Store apps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ dev_langs:

The following example validates an XML file using schemas stored in the <xref:System.Xml.Schema.XmlSchemaSet>. The namespace in the XML file, `urn:bookstore-schema`, identifies which schema in the <xref:System.Xml.Schema.XmlSchemaSet> to use for validation. Output from the example shows that the XML file has two schema violations:

- The first \<book> element contains an \<author> element but no \<title> or \<price> element.
- The first `<book>` element contains an `<author>` element but no `<title>` or `<price>` element.

- The \<author> element in the last \<book> element is missing a \<first-name> and \<last-name> element and instead has an invalid \<name> element.
- The `<author>` element in the last `<book>` element is missing a `<first-name>` and `<last-name>` element and instead has an invalid `<name>` element.

:::code language="csharp" source="./snippets/System.Xml/XmlReaderSettings/ValidationType/csharp/validschemaset.cs" id="Snippet1":::
:::code language="vb" source="./snippets/System.Xml.Schema/XmlSchemaSet/Overview/vb/validschemaset.vb" id="Snippet1":::
Expand Down
2 changes: 1 addition & 1 deletion docs/standard/analyzers/platform-compat-analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The platform compatibility analyzer is one of the Roslyn code quality analyzers.
- If the platform is a [subset of another platform](#platform-inclusion), the attribute implies that the superset platform is also unsupported. For example, `[UnsupportedOSPlatform("iOS")]` implies that the API is unsupported on `iOS` and also on its superset platform, `MacCatalyst`.
- The analyzer produces a **warning** only if the `platform` is effective for the call site:
- **Warns** if the project targets the platform that's attributed as unsupported (for example, if the API is attributed with `[UnsupportedOSPlatform("windows")]` and the call site targets `<TargetFramework>net5.0-windows</TargetFramework>`).
- **Warns** if the project is multi-targeted and the `platform` is included in the default [MSBuild `<SupportedPlatform>`](https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedPlatforms.props) items group, or the `platform` is manually included within the `MSBuild` \<SupportedPlatform> items group:
- **Warns** if the project is multi-targeted and the `platform` is included in the default [MSBuild `<SupportedPlatform>`](https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedPlatforms.props) items group, or the `platform` is manually included within the `MSBuild` `<SupportedPlatform>` items group:

```xml
<ItemGroup>
Expand Down
Loading