You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Visual Studio can receive debug trace information from WPF applications and display it in the Output window. Learn how to manage and customize WPF tracing.
4
-
ms.date: 11/04/2016
2
+
title: Display WPF trace information for data binding
3
+
description: Visual Studio can receive debug trace information for data binding from WPF applications and display it in the Output window. Learn how to manage and customize WPF tracing.
4
+
ms.date: 02/25/2025
5
5
ms.topic: how-to
6
6
dev_langs:
7
7
- CSharp
@@ -16,13 +16,14 @@ ms.author: mikejo
16
16
manager: mijacobs
17
17
ms.subservice: debug-diagnostics
18
18
---
19
-
# Display WPF Trace Information
20
19
21
-
Visual Studio can receive debug trace information from WPF applications and display that information in the **Output** window. To display debug trace information, WPF tracing must be enabled.
20
+
# Display WPF trace information for data binding
21
+
22
+
Visual Studio can receive debug trace information for data binding from WPF applications and display that information in the **Output** window. To display debug trace information, WPF tracing must be enabled.
22
23
23
24
You can enable WPF tracing in your App.Config file or programmatically by using the <xref:System.Diagnostics.PresentationTraceSources> class. An easier way to enable WPF tracing is by using the **Options** window. WPF tracing for web applications is not supported.
24
25
25
-
### To enable or customize WPF trace information
26
+
##Enable or customize WPF trace information
26
27
27
28
1. On the **Tools** menu, select **Options**.
28
29
@@ -32,51 +33,29 @@ Visual Studio can receive debug trace information from WPF applications and disp
32
33
33
34
4. Under **General Output Settings**, select **All debug output**.
34
35
35
-
5. In the box on the right, look for **WPF Trace Settings**.
36
-
37
-
6. Open the **WPF Trace Settings** node.
36
+
5. In the box on the right, open the **WPF Trace Settings** node.
38
37
39
-
7. Under **WPF Trace Settings**, click the category of settings that you want to enable (for example, **Data Binding**).
38
+
6. Under **WPF Trace Settings**, select **Data Binding**.
40
39
41
-
A drop-down list control appears in the Settings column next to **Data Binding** or whatever category you clicked.
40
+
A drop-down list control appears in the Settings column next to **Data Binding**.
42
41
43
-
8. Click the drop-down list and select the type of trace information that you want to see: **All**, **Critical**, **Error**, **Warning**, **Information**, **Verbose**, or **ActivityTracing**.
42
+
7. Click the drop-down list and select the type of trace information that you want to see.
44
43
45
-
**Critical** enables tracing of Critical events only.
44
+
-**Critical** enables tracing of Critical events only.
46
45
47
-
**Error** enables tracing of Critical and Error events.
46
+
-**Error** enables tracing of Critical and Error events.
48
47
49
-
**Warning** enables tracing of Critical, Error, and Warning events.
48
+
-**Warning** enables tracing of Critical, Error, and Warning events.
50
49
51
-
**Information** enables tracing of Critical, Error, Warning, and Information events.
50
+
-**Information** enables tracing of Critical, Error, Warning, and Information events.
52
51
53
-
**Verbose** enables tracing of Critical, Error, Warning, Information, and Verbose events.
52
+
-**Verbose** enables tracing of Critical, Error, Warning, Information, and Verbose events.
54
53
55
-
**ActivityTracing** enables tracing of Stop, Start, Suspend, Transfer, and Resume events.
54
+
-**ActivityTracing** enables tracing of Stop, Start, Suspend, Transfer, and Resume events.
56
55
57
56
For more information about what these levels of trace information mean, see <xref:System.Diagnostics.SourceLevels>.
58
57
59
58
9. Click **OK**.
60
59
61
-
### To disable WPF trace information
62
-
63
-
1. On the **Tools** menu, select **Options**.
64
-
65
-
2. In the **Options** dialog box, in the box on the left, open the **Debugging** node.
66
-
67
-
3. Under **Debugging**, click **Output Window**.
68
-
69
-
4. In the box on the right, look for **WPF Trace Settings**.
70
-
71
-
5. Open the **WPF Trace Settings** node.
72
-
73
-
6. Under **WPF Trace Settings**, click the category of settings that you want to enable (for example, **Data Binding**).
74
-
75
-
A drop-down list control appears in the Settings column next to **Data Binding** or whatever category you clicked.
Copy file name to clipboardExpand all lines: docs/ide/how-to-specify-build-events-visual-basic.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Specify build events (Visual Basic)'
3
3
description: Explore how to use build events in Visual Basic to run scripts, macros, or other actions as a part of the compilation process.
4
-
ms.date: 12/13/2024
4
+
ms.date: 2/20/2025
5
5
ms.subservice: compile-build
6
6
ms.topic: how-to
7
7
helpviewer_keywords:
@@ -54,14 +54,16 @@ Build events are specified in the **Build Events** dialog box, available from th
54
54
:::moniker-end
55
55
56
56
> [!NOTE]
57
-
> Add a `call` statement before all post-build commands that run *.bat* files. For example, `call C:\MyFile.bat` or `call C:\MyFile.bat call C:\MyFile2.bat`.
57
+
> Add a `call` statement before all post-build commands that run `.bat` files. For example, `call C:\MyFile.bat` or `call C:\MyFile.bat call C:\MyFile2.bat`.
58
58
59
59
> [!NOTE]
60
60
> If your pre-build or post-build event does not complete successfully, you can terminate the build by having your event action exit with a code other than zero (0), which indicates a successful action.
61
61
62
+
You can reference "macros" (actually MSBuild property names) in the scripts. To reference a property, use the syntax `$(PropertyName)`, which is substituted with the property value when the event script is executed. For a list of commonly used values, see [MSBuild common properties](../msbuild/common-msbuild-project-properties.md). There may be other properties as well as defined in the project file, in any imported files in the project file, in environment variables, or passed on the command line using the `-p` MSBuild switch during command-line builds.
63
+
62
64
## Example: How to change manifest information using a post-build event
63
65
64
-
The following procedure shows how to set the minimum operating system version in the application manifest using an *.exe* command called from a post-build event (the *.exe.manifest* file in the project directory). The minimum operating system version is a four-part number such as 4.10.0.0. To do this, the command will change the `<dependentOS>` section of the manifest:
66
+
The following procedure shows how to set the minimum operating system version in the application manifest using an `.exe` command called from a post-build event (the `.exe.manifest` file in the project directory). The minimum operating system version is a four-part number such as 4.10.0.0. To do this, the command will change the `<dependentOS>` section of the manifest:
65
67
66
68
```xml
67
69
<dependentOS>
@@ -159,9 +161,9 @@ The following procedure shows how to set the minimum operating system version in
When you build the project, this command will change the minimum operating system version in the application manifest to 5.1.2600.0.
164
+
When you build the project, this command changes the minimum operating system version in the application manifest to 5.1.2600.0.
163
165
164
-
The `$(TargetPath)` macro expresses the full path for the executable being created. Therefore, *$(TargetPath).manifest* will specify the application manifest created in the *bin* directory. Publishing will copy this manifest to the publishing location that you set earlier.
166
+
The `$(TargetPath)` macro expresses the full path for the executable being created. Therefore, `$(TargetPath).manifest` specifes the application manifest created in the *bin* directory. Publishing copies this manifest to the publishing location that you set earlier.
165
167
166
168
8. Publish the project again. Go to the **Publish** page and click **Publish Now**.
Copy file name to clipboardExpand all lines: docs/msbuild/net-sdk-multitargeting.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,22 @@ Diamond dependencies occur when multiple versions of a package are present in th
117
117
118
118
By following these practices, you can effectively manage version-specific dependencies in your .NET projects, ensuring compatibility and stability across different target frameworks. See [Manage package dependencies in .NET applications](/dotnet/core/tools/dependencies), [Dependencies](/dotnet/standard/library-guidance/dependencies), and [How NuGet resolves package dependencies](/nuget/concepts/dependency-resolution).
119
119
120
+
## Specify runtime identifiers
121
+
122
+
A runtime identifier (RID) specifies a target runtime environment, which consists of a unique combination of operating system and CPU. Runtime identifiers affect the architecture-dependent NuGet packages that are used. Runtime identifiers consist of a shorthand code, for example, `linux-x64`. For more information and a list of RID codes for each supported operating system and CPU, see [.NET RID catalog](/dotnet/core/rid-catalog).
123
+
124
+
RIDs are specified using the `<RuntimeIdentifier>` property in the project file. You can also use the plural form `<RuntimeIdentifiers>` to specify multiple target architectures.
125
+
126
+
For .NET Core projects, target frameworks and target runtimes specified as RIDs act separately, and may be used in any supported combination, including multiple RIDs and multiple target frameworks. For a .NET Framework target, you can only specify a single RID.
127
+
128
+
There's a distinction between a build that is inherently independent of RID (by specifying `RuntimeIdentifiers`) and a build that targets an RID (by specifying `RuntimeIdentifier` or by using the `-r` option with the `dotnet` CLI).
129
+
130
+
If you specify `RuntimeIdentifiers`, the RID affects the NuGet packages your application binaries depend on, but the binary itself only depends on the target framework. Therefore, in this scenario, although separate output folders are created for each different target framework (for example, `bin\Debug\netstandard2.0` and `bin\Debug\net8.0`), they are not created for each RID.
131
+
132
+
Specifying `RuntimeIdentifiers` does not inherently mean each build or publish operation targets each of the RIDs that are specified. Instead, it signals to NuGet Restore the set of RID-specific NuGet packages that need to be downloaded during a restore operation. This means that it's feasible to do `dotnet restore && dotnet publish -r linux-x64 --no-restore` to download the correct runtime packages for the RID you specify.
133
+
134
+
If a single RuntimeIdentifier is specified (either via `-r` on the CLI or setting the `RuntimeIdentifier` property in an MSBuild project file), then most operations become platform-specific, including `dotnet publish` and `dotnet build`. In this case, the output paths and several other MSBuild properties are modified. For example, the output directory of a build with a single RID will have the RID appended: `bin\Debug\<TFM>\<RID>`.
135
+
120
136
## Comparison Between .NET Framework and .NET Core Multitargeting
121
137
122
138
Multitargeting for .NET Core (and .NET 5 and later) is very different and more powerful than [multitargeting for .NET Framework projects](msbuild-multitargeting-overview.md).
0 commit comments