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
Copy file name to clipboardExpand all lines: docs/code-quality/code-metrics-values.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: How code metrics help identify risks
3
-
ms.date: 11/29/2023
3
+
ms.date: 04/14/2025
4
4
description: Learn about cyclomatic complexity, class coupling, and other Visual Studio code metrics. See how metrics can track development progress and identify risks.
Copy file name to clipboardExpand all lines: docs/code-quality/how-to-generate-code-metrics-data.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Generate code metrics from the IDE or command line
3
-
ms.date: 11/02/2018
3
+
ms.date: 04/14/2025
4
4
description: Learn how to generate code metrics data in Visual Studio. See how to use Solution Explorer, a rule set file, the command line, or a menu command.
Copy file name to clipboardExpand all lines: docs/code-quality/install-net-analyzers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Enable or install first-party .NET analyzers
3
-
ms.date: 09/14/2023
3
+
ms.date: 04/14/2025
4
4
description: Enable first-party .NET analyzers by using the .NET SDK in Visual Studio or install a first-party analyzer as a NuGet package.
5
5
ms.topic: how-to
6
6
helpviewer_keywords:
@@ -13,13 +13,13 @@ ms.subservice: code-analysis
13
13
14
14
# Enable or install first-party .NET analyzers
15
15
16
-
.NET compiler platform (Roslyn) analyzers inspect your C# or Visual Basic code for code quality and code style issues. The first-party .NET analyzers are **target-platform agnostic**. That is, your project doesn't need to target a specific .NET platform. The analyzers work for projects that target `net5.0` and earlier .NET versions, such as `netcoreapp`, `netstandard`, and `net472`.
16
+
.NET compiler platform (Roslyn) analyzers inspect your C# or Visual Basic code for code quality and code style issues. The first-party .NET analyzers are **target-platform agnostic**. That is, your project doesn't need to target a specific .NET platform. The analyzers work for projects that target `net5.0`, later versions, as well as earlier .NET versions, such as `netcoreapp`, `netstandard`, and `net472`.
17
17
18
18
You can enable or install the first-party .NET analyzers in one of the following ways:
19
19
20
20
-**Enable from the .NET SDK:** Starting in Visual Studio 2019 16.8 and .NET 5.0, these analyzers are [included with the .NET SDK](/dotnet/fundamentals/code-analysis/overview), which is included with Visual Studio. Analysis is enabled, by default, for projects that target .NET 5.0 or later. You can enable code analysis on projects that target earlier .NET versions by setting the MSBUILD [EnableNETAnalyzers](/dotnet/core/project-sdk/msbuild-props#enablenetanalyzers) property to `true`. You can also disable code analysis for your project by setting `EnableNETAnalyzers` to `false`.
21
21
22
-
-**Install as a NuGet package:** If you don't want to move to the .NET 5+ SDK or if you prefer a NuGet package-based model, the analyzers are also available in the `Microsoft.CodeAnalysis.NetAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers) on Visual Studio 2019. You might prefer a package-based model for on-demand version updates. If you're on Visual Studio 2017, install the latest `2.9.x` version of the `Microsoft.CodeAnalysis.FxCopAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) instead.
22
+
-**Install as a NuGet package:** If you don't want to move to the .NET 5+ SDK or if you prefer a NuGet package-based model, the analyzers are also available in the `Microsoft.CodeAnalysis.NetAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers) on Visual Studio 2019 and Visual Studio 2022. You might prefer a package-based model for on-demand version updates. If you're on Visual Studio 2017, install the latest `2.9.x` version of the `Microsoft.CodeAnalysis.FxCopAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) instead.
23
23
24
24
> [!NOTE]
25
25
> It is recommended that you enable the analyzers from the .NET SDK instead of installing the `Microsoft.CodeAnalysis.NetAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers), when possible. Enabling the analyzers from the .NET SDK ensures that you automatically get the analyzer bug fixes and new analyzers as soon as you update the SDK. In the NuGet model, you need to update the NuGet package each time you want the latest bug fixes. The NuGet package is updated more frequently.
description: "This error occurs when there's an issue with a .resx resource file."
4
-
ms.date: "1/27/2025"
2
+
title: MSB3103 diagnostic code
3
+
description: Learn about the possible causes of the MSB3103 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3103
@@ -16,52 +16,52 @@ ms.author: ghogen
16
16
manager: mijacobs
17
17
ms.subservice: msbuild
18
18
---
19
-
# MSB3103: Invalid Resx file
19
+
# MSB3103
20
20
21
-
This error occurs when there/s an issue with a `.resx` resource file. When you see this error, another error is displayed with more details. Look to the other error for more information.
21
+
This article describes the MSB3103 error code.
22
22
23
23
## Message text
24
24
25
-
`MSB3103: Invalid Resx file`
25
+
`Invalid Resx file`
26
26
27
-
## Remarks
27
+
## Description
28
28
29
-
The error MSB3103 occurs when MSBuild encounters an invalid `.resx`file during the build process. This error indicates that the `.resx` file can't be properly read or processed, often due to incorrect file paths or references.
29
+
This error occurs when there's an issue with a `.resx`resource file. This error indicates that the `.resx` file can't be properly read or processed, often due to incorrect file paths or references.
30
30
31
-
## Common Causes
31
+
###Common causes
32
32
33
-
This error can occur in the following scenarios:
33
+
The following causes can result in this error:
34
34
35
-
1.**Missing or Inaccessible Resources**: The `.resx` file references external resources (for example, images or files) that aren't present in the expected location or are inaccessible.
36
-
- Example: A file path specified in the `.resx` is incorrect or points to a missing file.
37
-
2.**Incorrect type reference**: The `.resx` file referenced a type that couldn't be found.
38
-
- Example: A typo in a type reference in a ResXFile reference, or a type that was not available for some reason.
39
-
3.**Corrupted files**: The `.resx` file or one of its dependencies was corrupted.
35
+
| Cause | Description | Example |
36
+
| --- | --- | --- |
37
+
|**Missing or inaccessible resources**|The `.resx` file references external resources (for example, images or files) that aren't present in the expected location or are inaccessible. | A file path specified in the `.resx` file is incorrect or points to a missing file. |
38
+
|**Incorrect type reference**| The `.resx` file referenced a type that can't be found. |A typo in a type reference in a ResXFile reference, or a type that isn't available for some reason.|
39
+
|**Corrupted files**|The `.resx` file or one of its dependencies is corrupted.| The `.resx` file contains unreadable characters and the build isn't able to process the file. |
40
40
41
-
## Real-World Scenarios
41
+
###Real-world scenarios
42
42
43
-
1.**Migrating projects**: When you're upgrading a legacy project from .NET Framework to .NET Core or .NET 6+, existing `.resx` files may contain elements or attributes that are incompatible with the newer frameworks.
44
-
2.**Manual edits to `.resx` files**: Someone manually editing `.resx` files might inadvertently introduce syntax errors or invalid data.
45
-
3.**Broken resource links**: Referencing external files (for example, images or icons) in `.resx` files without ensuring these files are included in the project or accessible during the build.
46
-
4.**Corrupted `.resx` files**: Files can become corrupted due to version control conflicts or file encoding changes.
43
+
Here are some real-world scenarios that can lead to this error:
47
44
48
-
### Resolution
45
+
-**Project migration**: Upgrading a legacy project from .NET Framework to .NET Core or .NET 6+ where existing `.resx` files contain elements or attributes that aren't compatible with the newer frameworks.
49
46
50
-
1.**Check Resource Entries**:
51
-
- If external resources are referenced, verify their paths and existence.
47
+
-**Manual edits to .resx files**: Manual edits to `.resx` files that inadvertently introduce syntax errors or invalid data.
52
48
53
-
2.**Use the ResX Resource Manager**:
54
-
- Consider using tools like [ResX Resource Manager](https://github.com/dotnet/ResXResourceManager) to validate and manage `.resx` files.
49
+
-**Broken resource links**: References to external files (for example, images or icons) in `.resx` files where the files aren't included in the project or accessible during the build.
55
50
56
-
3.**Update for Framework Compatibility**:
57
-
- Review changes in resource handling for the target framework.
58
-
- Update `.resx` files to align with the requirements of the new framework.
51
+
-**Corrupted .resx files**: Files are corrupted due to version control conflicts or file encoding changes.
52
+
53
+
## Resolution
59
54
60
-
4.**Revert to a Known Good State**:
61
-
- If the `.resx` file has become corrupted, revert to a previous version from source control.
55
+
-**Check resource entries**: If external resources are referenced, verify their paths and existence.
62
56
57
+
-**Use the ResX Resource Manager**: Consider using tools like [ResX Resource Manager](https://github.com/dotnet/ResXResourceManager) to validate and manage `.resx` files.
63
58
64
-
## Related Content
59
+
-**Update for framework compatibility**: Review changes in resource handling for the target framework. Update `.resx` files to align with the requirements of the new framework.
Copy file name to clipboardExpand all lines: docs/msbuild/errors/msb3190.md
+21-7Lines changed: 21 additions & 7 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
-
title: "MSB3190: ClickOnce does not support the request execution level 'level'"
3
-
description: "This error occurs when an *app.manifest* included in the project does not have UAC Execution level set to `asInvoker` (which ClickOnce requires)."
4
-
ms.date: "07/22/2021"
2
+
title: MSB3190 diagnostic code
3
+
description: Learn about the possible causes of the MSB3190 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3190
@@ -16,11 +16,21 @@ ms.author: ghogen
16
16
manager: mijacobs
17
17
ms.subservice: msbuild
18
18
---
19
-
# MSB3190: ClickOnce does not support the request execution level 'level'
19
+
# MSB3190
20
20
21
-
This error occurs when an *app.manifest* included in the project does not have UAC Execution level set to `asInvoker` (which ClickOnce requires).
21
+
This article describes the MSB3190 error code.
22
22
23
-
To resolve this error, make sure you have the following in *app.manifest* under the `trustInfo` settings:
23
+
## Message text
24
+
25
+
`ClickOnce does not support the request execution level 'level'`
26
+
27
+
## Description
28
+
29
+
This error occurs when an *app.manifest* file included in the project doesn't have UAC Execution level set to `asInvoker` (which ClickOnce requires).
30
+
31
+
## Resolution
32
+
33
+
To resolve this error, make sure you have the following definition in the *app.manifest* file under the `trustInfo` settings:
Copy file name to clipboardExpand all lines: docs/msbuild/errors/msb3191.md
+17-7Lines changed: 17 additions & 7 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
-
title: "MSB3191: Unable to create directory 'name'."
3
-
description: "This error occurs when MSBuild could not create a directory."
4
-
ms.date: "08/15/2022"
2
+
title: MSB3191 diagnostic code
3
+
description: Learn about the possible causes of the MSB3191 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3191
@@ -18,10 +18,20 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3191
20
20
21
+
This article describes the MSB3191 error code.
22
+
23
+
## Message text
24
+
25
+
`MSB3191: Unable to create directory 'name'.`
26
+
27
+
## Description
28
+
21
29
This error occurs when MSBuild attempts to create a directory, but the operating system returns an error.
22
30
23
-
```output
24
-
MSB3191: Unable to create directory 'name'.
25
-
```
31
+
## Resolution
32
+
33
+
The standard output message text is followed by additional information from the operating system. Look to the additional information provided to determine the cause of the problem.
34
+
35
+
## Applies to
26
36
27
-
When this message is emitted, the error text from the operating system is also given. Look to the additional information to determine the cause of the problem.
title: "MSB3202: The project file 'filename' was not found."
3
-
description: "This error occurs when MSBuild can't find a project file with the specified name at the expected location."
4
-
ms.date: 1/21/2025
2
+
title: MSB3202 diagnostic code
3
+
description: Learn about the possible causes of the MSB3202 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3202
@@ -18,40 +18,34 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3202
20
20
21
-
This error occurs when MSBuild can't find a project file with the specified name at the expected location.
21
+
This article describes the MSB3202 error code.
22
22
23
-
The full message is something like the following text:
23
+
## Message text
24
24
25
-
```output
26
-
MSB3202: The project file 'filename' was not found.
27
-
```
25
+
`MSB3202: The project file 'filename' was not found.`
28
26
29
-
## Remarks
27
+
## Description
30
28
31
29
The MSB3202 error occurs when MSBuild is unable to locate the specified project file. This error is generated when a build is invoked with an incorrect or missing project file path, or incorrect or missing dependent project file.
32
30
33
-
##Common causes
31
+
### Real-world scenarios
34
32
35
-
Here are some real-world scenarios that can lead to this error, especially in modern development and CI/CD environments:
33
+
Here are some real-world scenarios that can produce this error, especially in modern development and CI/CD environments:
36
34
37
-
1.**Incorrect file path in command line or build script**
38
-
- When invoking MSBuild, the specified project file path doesn't exist or is mistyped. Check the path, especially for syntax issues such as quotes around paths with spaces.
35
+
-**Incorrect file path in command line or build script**: When you invoke MSBuild, the specified project file path doesn't exist or is mistyped.
39
36
40
-
2.**Project file renamed or deleted**
41
-
- A project file was renamed or removed from the repository, but the build logic or one of the build inputs was not updated to reflect this change.
37
+
-**Project file renamed or deleted**: A project file was renamed or removed from the repository, but the build logic or one of the build inputs isn't updated to reflect the change.
42
38
43
-
3.**Repository checkout issues**
44
-
- During a CI/CD pipeline execution, the source code repository might not be fully checked out, or the necessary project file is excluded due to `.gitignore` rules or shallow cloning.
39
+
-**Repository checkout issues**: During a CI/CD pipeline execution, the source code repository might not be fully checked out, or the necessary project file is excluded due to `.gitignore` rules or shallow cloning.
45
40
46
41
## Resolution
47
42
48
-
1. Verify that the project file exists at the specified location.
49
-
- Use an absolute path to the project file to avoid ambiguity.
50
-
- Example:
43
+
- Verify the project file exists at the specified location. Avoid ambiguity by using an absolute path to the project file, such as `msbuild C:\Projects\MySolution\MyProject.csproj`.
51
44
52
-
`msbuild C:\Projects\MySolution\MyProject.csproj`
45
+
- Check for typos in the `ProjectReference` item in the project file. Confirm the path has no syntax issues like missing quotes for paths that include spaces.
53
46
54
-
2. Check for typos in the ProjectReference item in the project file.
47
+
- Ensure your version control system includes all necessary project files and the repository checkout is complete.
55
48
56
-
3. Ensure your version control system includes all necessary project files and that the repository checkout is complete.
Copy file name to clipboardExpand all lines: docs/msbuild/errors/msb3231.md
+16-8Lines changed: 16 additions & 8 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
-
title: "MSB3231: Unable to remove directory 'name'."
3
-
description: "This error occurs when MSBuild tries to delete a directory, but the operating system returns an error."
4
-
ms.date: "08/15/2022"
2
+
title: MSB3231 diagnostic code
3
+
description: Learn about the possible causes of the MSB3231 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3231
@@ -18,12 +18,20 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3231
20
20
21
+
This article describes the MSB3231 error code.
22
+
23
+
## Message text
24
+
25
+
`MSB3231: Unable to remove directory 'name'.`
26
+
27
+
## Description
28
+
21
29
This error occurs when MSBuild tries to delete a directory, but the operating system returns an error.
22
30
23
-
The message resembles the following, but this text is followed by additional information from the operating system:
31
+
## Resolution
32
+
33
+
The standard output message text is followed by additional information from the operating system. Look to the additional information provided to determine the cause of the problem.
24
34
25
-
```output
26
-
MSB3231: Unable to remove directory 'name'.
27
-
```
35
+
## Applies to
28
36
29
-
Look to the additional information provided by the operating system to determine the cause of the problem.
title: "MSB3243: No way to resolve conflict between 'first assembly' and 'second assembly'. Choosing 'first assembly' arbitrarily."
3
-
description: "This diagnostic code is emitted when MSBuild finds two conflicting assemblies for a given reference, with no way to resolve the conflict."
4
-
ms.date: "08/15/2022"
2
+
title: MSB3243 diagnostic code
3
+
description: Learn about the possible causes of the MSB3243 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3243
@@ -18,14 +18,22 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3243
20
20
21
-
This diagnostic code is emitted when MSBuild finds two conflicting assemblies for a given reference, with no way to resolve the conflict. In such cases, MSBuild chooses one of the assemblies arbitrarily and continues processing the build.
21
+
This article describes the MSB3243 error code.
22
+
23
+
## Message text
22
24
23
-
The message text resembles the following text:
25
+
`MSB3243: No way to resolve conflict between 'first assembly' and 'second assembly'. Choosing 'first assembly' arbitrarily.`
24
26
25
-
```output
26
-
MSB3243: No way to resolve conflict between 'first assembly' and 'second assembly'. Choosing 'first assembly' arbitrarily.
27
-
```
27
+
## Description
28
+
29
+
This diagnostic code is emitted when MSBuild finds two conflicting assemblies for a given reference, with no way to resolve the conflict. In such cases, MSBuild chooses one of the assemblies arbitrarily and continues processing the build.
28
30
29
-
A diagnostic build log will have more information about how the two conflicting assemblies were found which may help restructure your build to avoid the warning.
31
+
## Resolution
32
+
33
+
A diagnostic build log has more information about how the two conflicting assemblies were found. The log information might help you to restructure your build to avoid the warning.
30
34
31
35
For a guide on resolving errors with assembly references, see [Troubleshoot assembly references](../troubleshoot-assembly-references.md).
0 commit comments