Skip to content

Commit d51198a

Browse files
Merge pull request #10713 from MicrosoftDocs/main638802758234009520sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 4902e8b + 6d0d06b commit d51198a

File tree

13 files changed

+201
-139
lines changed

13 files changed

+201
-139
lines changed

docs/code-quality/code-metrics-values.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How code metrics help identify risks
3-
ms.date: 11/29/2023
3+
ms.date: 04/14/2025
44
description: Learn about cyclomatic complexity, class coupling, and other Visual Studio code metrics. See how metrics can track development progress and identify risks.
55
ms.topic: conceptual
66
f1_keywords:

docs/code-quality/how-to-generate-code-metrics-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Generate code metrics from the IDE or command line
3-
ms.date: 11/02/2018
3+
ms.date: 04/14/2025
44
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.
55
ms.topic: how-to
66
helpviewer_keywords:

docs/code-quality/install-net-analyzers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Enable or install first-party .NET analyzers
3-
ms.date: 09/14/2023
3+
ms.date: 04/14/2025
44
description: Enable first-party .NET analyzers by using the .NET SDK in Visual Studio or install a first-party analyzer as a NuGet package.
55
ms.topic: how-to
66
helpviewer_keywords:
@@ -13,13 +13,13 @@ ms.subservice: code-analysis
1313

1414
# Enable or install first-party .NET analyzers
1515

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`.
1717

1818
You can enable or install the first-party .NET analyzers in one of the following ways:
1919

2020
- **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`.
2121

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.
2323

2424
> [!NOTE]
2525
> 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.

docs/msbuild/errors/msb3103.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: "MSB3103: Invalid Resx file"
3-
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
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3103
@@ -16,52 +16,52 @@ ms.author: ghogen
1616
manager: mijacobs
1717
ms.subservice: msbuild
1818
---
19-
# MSB3103: Invalid Resx file
19+
# MSB3103
2020

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.
2222

2323
## Message text
2424

25-
`MSB3103: Invalid Resx file`
25+
`Invalid Resx file`
2626

27-
## Remarks
27+
## Description
2828

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.
3030

31-
## Common Causes
31+
### Common causes
3232

33-
This error can occur in the following scenarios:
33+
The following causes can result in this error:
3434

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. |
4040

41-
## Real-World Scenarios
41+
### Real-world scenarios
4242

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:
4744

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.
4946

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.
5248

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.
5550

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
5954

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.
6256

57+
- **Use the ResX Resource Manager**: Consider using tools like [ResX Resource Manager](https://github.com/dotnet/ResXResourceManager) to validate and manage `.resx` files.
6358

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.
6560

66-
- [MSBuild Documentation](../msbuild.md)
67-
- [ResX Resource Manager](https://github.com/dotnet/ResXResourceManager)
61+
- **Revert to a known good state**: If the `.resx` file is corrupted, revert to a previous version from source control.
62+
63+
For more information, see [MSBuild Documentation](../msbuild.md) and [ResX Resource Manager](https://github.com/dotnet/ResXResourceManager).
64+
65+
## Applies to
66+
67+
All versions of MSBuild

docs/msbuild/errors/msb3190.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
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
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3190
@@ -16,11 +16,21 @@ ms.author: ghogen
1616
manager: mijacobs
1717
ms.subservice: msbuild
1818
---
19-
# MSB3190: ClickOnce does not support the request execution level 'level'
19+
# MSB3190
2020

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.
2222

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:
2434

2535
```xml
2636
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
@@ -33,4 +43,8 @@ To resolve this error, make sure you have the following in *app.manifest* under
3343
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
3444
```
3545

36-
See [requestedExecutionLevel](../../deployment/trustinfo-element-clickonce-application.md#requestedexecutionlevel).
46+
For more information, see [requestedExecutionLevel](../../deployment/trustinfo-element-clickonce-application.md#requestedexecutionlevel).
47+
48+
## Applies to
49+
50+
All versions of MSBuild

docs/msbuild/errors/msb3191.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
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
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3191
@@ -18,10 +18,20 @@ ms.subservice: msbuild
1818
---
1919
# MSB3191
2020

21+
This article describes the MSB3191 error code.
22+
23+
## Message text
24+
25+
`MSB3191: Unable to create directory 'name'.`
26+
27+
## Description
28+
2129
This error occurs when MSBuild attempts to create a directory, but the operating system returns an error.
2230

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
2636

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.
37+
All versions of MSBuild

docs/msbuild/errors/msb3202.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
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
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3202
@@ -18,40 +18,34 @@ ms.subservice: msbuild
1818
---
1919
# MSB3202
2020

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.
2222

23-
The full message is something like the following text:
23+
## Message text
2424

25-
```output
26-
MSB3202: The project file 'filename' was not found.
27-
```
25+
`MSB3202: The project file 'filename' was not found.`
2826

29-
## Remarks
27+
## Description
3028

3129
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.
3230

33-
## Common causes
31+
### Real-world scenarios
3432

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:
3634

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.
3936

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.
4238

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.
4540

4641
## Resolution
4742

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`.
5144

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.
5346

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.
5548

56-
3. Ensure your version control system includes all necessary project files and that the repository checkout is complete.
49+
## Applies to
5750

51+
All versions of MSBuild

docs/msbuild/errors/msb3231.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
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
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3231
@@ -18,12 +18,20 @@ ms.subservice: msbuild
1818
---
1919
# MSB3231
2020

21+
This article describes the MSB3231 error code.
22+
23+
## Message text
24+
25+
`MSB3231: Unable to remove directory 'name'.`
26+
27+
## Description
28+
2129
This error occurs when MSBuild tries to delete a directory, but the operating system returns an error.
2230

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.
2434

25-
```output
26-
MSB3231: Unable to remove directory 'name'.
27-
```
35+
## Applies to
2836

29-
Look to the additional information provided by the operating system to determine the cause of the problem.
37+
All versions of MSBuild

docs/msbuild/errors/msb3243.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
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
55
ms.topic: "error-reference"
66
f1_keywords:
77
- MSB3243
@@ -18,14 +18,22 @@ ms.subservice: msbuild
1818
---
1919
# MSB3243
2020

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
2224

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.`
2426

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.
2830

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.
3034

3135
For a guide on resolving errors with assembly references, see [Troubleshoot assembly references](../troubleshoot-assembly-references.md).
36+
37+
## Applies to
38+
39+
All versions of MSBuild

0 commit comments

Comments
 (0)