Skip to content

Commit 08fa75b

Browse files
authored
updates around config files (#7994)
1 parent 91a8225 commit 08fa75b

File tree

13 files changed

+108
-142
lines changed

13 files changed

+108
-142
lines changed

xml/Microsoft.CSharp/CSharpCodeProvider.xml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,14 @@
114114
<Parameter Name="providerOptions" Type="System.Collections.Generic.IDictionary&lt;System.String,System.String&gt;" Index="0" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;dotnet-plat-ext-5.0;dotnet-plat-ext-6.0;dotnet-plat-ext-7.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;xamarinmac-3.0" />
115115
</Parameters>
116116
<Docs>
117-
<param name="providerOptions">A <see cref="T:System.Collections.Generic.IDictionary`2" /> object that contains the provider options from the configuration file.</param>
117+
<param name="providerOptions">A <see cref="T:System.Collections.Generic.IDictionary`2" /> object that contains the provider options.</param>
118118
<summary>Initializes a new instance of the <see cref="T:Microsoft.CSharp.CSharpCodeProvider" /> class by using the specified provider options.</summary>
119119
<remarks>
120120
<format type="text/markdown"><![CDATA[
121121
122122
## Remarks
123-
The value for `providerOptions` is obtained from the [\<providerOption>](/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element) element in the configuration file. You can identify the version of the <xref:Microsoft.CSharp.CSharpCodeProvider> you want to use by specifying the `<providerOption>` element, supplying "CompilerVersion" as the option name, and supplying the version number (for example, "v3.5") as the option value. You must precede the version number with a lower case "v".
124-
125-
126-
127-
## Examples
128-
The following configuration file example demonstrates how to specify that version 3.5 of the C# code provider should be used.
123+
124+
In .NET Framework apps, you can obtain the value for `providerOptions` from the [\<providerOption>](/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element) element in the configuration file. You can identify the version of the <xref:Microsoft.CSharp.CSharpCodeProvider> you want to use by specifying the `<providerOption>` element, supplying "CompilerVersion" as the option name, and supplying the version number (for example, "v3.5") as the option value. You must precede the version number with a lower case "v". The following configuration file example demonstrates how to specify that version 3.5 of the C# code provider should be used.
129125
130126
```xml
131127
<configuration>
@@ -148,7 +144,9 @@
148144
</system.codedom>
149145
</configuration>
150146
```
151-
147+
148+
## Examples
149+
152150
The following example shows how to specify the compiler version when you create a new instance of the <xref:Microsoft.CSharp.CSharpCodeProvider> class.
153151
154152
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/.ctor/program.cs" id="Snippet1":::

xml/Microsoft.VisualBasic.Logging/FileLogTraceListener.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
## Remarks
3535
The <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener> class provides automated maintenance capabilities to archive log files as needed, on a daily or per-application basis. This automatic archival functionality helps reduce the maintenance responsibilities of developers and administrators.
3636
37-
An instance of <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener> can be added to the <xref:System.Diagnostics.Debug.Listeners%2A?displayProperty=nameWithType> or <xref:System.Diagnostics.Trace.Listeners%2A?displayProperty=nameWithType> collections to redirect output from logging to a text file. Instances of this class can also be added to `My.Application.Log` or `My.Log` (for Web applications) in Visual Basic applications. For more information, see [Walkthrough: Changing Where My.Application.Log Writes Information](/dotnet/visual-basic/developing-apps/programming/log-info/walkthrough-changing-where-my-application-log-writes-information)`.`
37+
An instance of <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener> can be added to the <xref:System.Diagnostics.Debug.Listeners%2A?displayProperty=nameWithType> or <xref:System.Diagnostics.Trace.Listeners%2A?displayProperty=nameWithType> collections to redirect output from logging to a text file. Instances of this class can also be added to `My.Application.Log` or `My.Log` (for Web applications) in Visual Basic applications. For more information, see [Walkthrough: Changing Where My.Application.Log Writes Information](/dotnet/visual-basic/developing-apps/programming/log-info/walkthrough-changing-where-my-application-log-writes-information).
3838
3939
The main features of this class are:
4040
@@ -102,9 +102,7 @@
102102
103103
- To enable tracing in C#, add the `/d:TRACE` flag to the compiler command line when you compile your code, or add `#define TRACE` to the top of your file. In Visual Basic, add the `/d:TRACE=True` flag to the compiler command line.
104104
105-
To set the level of your listener, edit the configuration file for your application. Within this file, you can add a listener, set its type and set its parameters, remove a listener, or clear all the listeners previously set by the application. The configuration file should be formatted like the following example.
106-
107-
For this example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names).
105+
In .NET Framework apps, you can set the level of your listener by editing the configuration file for your application. Within this file, you can add a listener, set its type and set its parameters, remove a listener, or clear all the listeners previously set by the application. The configuration file should be formatted like the following example.
108106
109107
```xml
110108
<configuration>
@@ -119,7 +117,9 @@
119117
</sharedListeners>
120118
</system.diagnostics>
121119
</configuration>
122-
```
120+
```
121+
122+
For this example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names).
123123
124124
]]></format>
125125
</remarks>

xml/Microsoft.VisualBasic/VBCodeProvider.xml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,14 @@
114114
<Parameter Name="providerOptions" Type="System.Collections.Generic.IDictionary&lt;System.String,System.String&gt;" Index="0" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;dotnet-plat-ext-5.0;dotnet-plat-ext-6.0;dotnet-plat-ext-7.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;xamarinmac-3.0" />
115115
</Parameters>
116116
<Docs>
117-
<param name="providerOptions">A <see cref="T:System.Collections.Generic.IDictionary`2" /> object that contains the provider options from the configuration file.</param>
117+
<param name="providerOptions">A <see cref="T:System.Collections.Generic.IDictionary`2" /> object that contains the provider options.</param>
118118
<summary>Initializes a new instance of the <see cref="T:Microsoft.VisualBasic.VBCodeProvider" /> class by using the specified provider options.</summary>
119119
<remarks>
120120
<format type="text/markdown"><![CDATA[
121121
122-
## Remarks
123-
The value for `providerOptions` is obtained from the [&lt;providerOption&gt;](/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element) element in the configuration file. You can identify the version of the <xref:Microsoft.VisualBasic.VBCodeProvider> you want to use by specifying the `<providerOption>` element, supplying "CompilerVersion" as the option name, and supplying the version number (for example, "v3.5") as the option value. You must precede the version number with a lower case "v".
124-
125-
126-
127-
## Examples
128-
The following configuration file example demonstrates how to specify that version 3.5 of the Visual Basic code provider should be used.
122+
## Remarks
123+
124+
In .NET Framework apps, you can obtain the value for `providerOptions` from the [\<providerOptions>](/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element) element in the configuration file. You can identify the version of the <xref:Microsoft.VisualBasic.VBCodeProvider> you want to use by specifying the `<providerOption>` element, supplying "CompilerVersion" as the option name, and supplying the version number (for example, "v3.5") as the option value. You must precede the version number with a lower case "v". The following configuration file example demonstrates how to specify that version 3.5 of the Visual Basic code provider should be used.
129125
130126
```xml
131127
<configuration>
@@ -148,7 +144,9 @@
148144
</system.codedom>
149145
</configuration>
150146
```
151-
147+
148+
## Examples
149+
152150
The following example shows how to specify the compiler version when creating a new instance of the <xref:Microsoft.VisualBasic.VBCodeProvider> class.
153151
154152
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/vbprovider.provideroptions/vb/program.vb" id="Snippet1":::

xml/System.ComponentModel.DataAnnotations/ValidationContext.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.C
436436
437437
Without this setting, this property returns `null` with .NET Framework October 2019 Preview of Quality Rollup or later versions.
438438
439-
In .NET Framework 4.8 version prior to the October 2019 update, this property returns member name without the configuration setting. If you change your *web.config* file as shown in the previous example, the property returns `null`.
439+
In .NET Framework 4.8 version prior to the October 2019 update, this property returns member name without the configuration setting. If you change your *web.config* file as shown in the previous example, the property returns `null`.
440440
441441
]]></format>
442442
</remarks>

xml/System.ComponentModel/TypeConverter.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,7 +2416,7 @@ Note: Your derived type might be marked as <see langword="internal" /> or <see l
24162416
## Remarks
24172417
Starting in .NET Framework 4, the <xref:System.ComponentModel.TypeConverter.IsValid%2A> method catches exceptions from the <xref:System.ComponentModel.TypeConverter.CanConvertFrom%2A> and <xref:System.ComponentModel.TypeConverter.ConvertFrom%2A> methods. If the input value type causes <xref:System.ComponentModel.TypeConverter.CanConvertFrom%2A> to return `false`, or if the input value causes <xref:System.ComponentModel.TypeConverter.ConvertFrom%2A> to raise an exception, the <xref:System.ComponentModel.TypeConverter.IsValid%2A> method returns `false`.
24182418
2419-
To enable the legacy behavior, insert the following lines into the configuration file of the application, for example, application1.exe.config.
2419+
To enable the legacy behavior, insert the following lines into the configuration file of your .NET Framework application.
24202420
24212421
```xml
24222422
<configuration>
@@ -2490,17 +2490,15 @@ Note: Your derived type might be marked as <see langword="internal" /> or <see l
24902490
24912491
Starting in .NET Framework 4, the <xref:System.ComponentModel.TypeConverter.IsValid%2A> method catches exceptions from the <xref:System.ComponentModel.TypeConverter.CanConvertFrom%2A> and <xref:System.ComponentModel.TypeConverter.ConvertFrom%2A> methods. If the input value type causes <xref:System.ComponentModel.TypeConverter.CanConvertFrom%2A> to return `false`, or if the input value causes <xref:System.ComponentModel.TypeConverter.ConvertFrom%2A> to raise an exception, the <xref:System.ComponentModel.TypeConverter.IsValid%2A> method returns `false`.
24922492
2493-
To enable the legacy behavior, insert the following lines into the configuration file of the application, for example, application1.exe.config.
2493+
To enable the legacy behavior, insert the following lines into the configuration file of your .NET Framework application.
24942494
24952495
```xml
24962496
<configuration>
24972497
<appSettings>
24982498
<add key="UseCompatibleTypeConverterBehavior" value="true" />
24992499
</appSettings>
25002500
</configuration>
2501-
```
2502-
2503-
2501+
```
25042502
25052503
## Examples
25062504
For an example of this function, see the <xref:System.ComponentModel.TypeConverter> class.

xml/System.Configuration/ConfigurationCollectionAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
## Examples
6464
The following example shows how to use the <xref:System.Configuration.ConfigurationCollectionAttribute>.
6565
66-
This example consists of three classes: `UrlsSection`, `UrlsCollection` and `UrlConfigElement`. The `UrlsSection` class uses the <xref:System.Configuration.ConfigurationCollectionAttribute> to define a custom configuration section. This section contains a URL collection (defined by the `UrlsCollection` class) of URL elements (defined by the `UrlConfigElement` class). When you run the example, an instance of the `UrlsSection` class is created and the following configuration elements are generated in the application configuration file:
66+
This example consists of three classes: `UrlsSection`, `UrlsCollection`, and `UrlConfigElement`. The `UrlsSection` class uses the <xref:System.Configuration.ConfigurationCollectionAttribute> to define a custom configuration section. This section contains a URL collection (defined by the `UrlsCollection` class) of URL elements (defined by the `UrlConfigElement` class). When you run the example, an instance of the `UrlsSection` class is created and the following configuration elements are generated in the application configuration file:
6767
6868
```xml
6969
<configuration>

0 commit comments

Comments
 (0)