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: "The primary reference 'name' could not be resolved because it has an indirect dependency on the assembly 'assembly-name' which was built against the 'version' framework. This is a higher version than the currently targeted framework 'version'."
4
-
ms.date: "07/07/2021"
2
+
title: MSB3275 diagnostic code
3
+
description: Learn about the possible causes of the MSB3275 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3275
@@ -18,17 +18,22 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3275
20
20
21
-
The full error text is similar to the following output:
21
+
This article describes the MSB3275 error code.
22
22
23
-
```output
24
-
The primary reference 'reference' could not be resolved because it has an indirect dependency on the assembly 'assembly-name' which was built against the 'version' framework. This is a higher version than the currently targeted framework 'version'.
25
-
```
23
+
## Message text
26
24
27
-
Dependent assemblies can't be builtagainst a higherversion of the .NET Framework than you are currently building for. Consider targeting a newer version of the .NET Framework.
25
+
`The primary reference 'reference' could not be resolved because it has an indirect dependency on the assembly 'assembly-name' which was builtagainst the 'version' framework. This is a higherversionthan the currently targeted framework 'version'.`
28
26
29
-
For a guide on resolving errors with assembly references, see [Troubleshoot assembly references](../troubleshoot-assembly-references.md).
27
+
## Description
30
28
31
-
## See also
29
+
Dependent assemblies can't be built against a higher version of the .NET Framework than the version you're currently building for.
32
30
33
-
-[MSBuild target framework and target platform](../msbuild-target-framework-and-target-platform.md)
34
-
-[MSB3274](msb3274.md)
31
+
## Resolution
32
+
33
+
Consider targeting a newer version of the .NET Framework. For a guide on resolving errors with assembly references, see [Troubleshoot assembly references](../troubleshoot-assembly-references.md).
34
+
35
+
For more information, see [MSBuild target framework and target platform](../msbuild-target-framework-and-target-platform.md) and [MSB3274](msb3274.md).
Copy file name to clipboardExpand all lines: docs/msbuild/errors/msb3276.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: "MSB3276"
3
-
description: "This error occurs when MSBuild finds different conflicting versions of the same dependent assembly."
4
-
ms.date: "08/15/2022"
2
+
title: MSB3276 diagnostic code
3
+
description: Learn about the possible causes of the MSB3276 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3276
@@ -18,12 +18,20 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3276
20
20
21
+
This article describes the MSB3276 error code.
22
+
23
+
## Message text
24
+
25
+
`MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.`
26
+
27
+
## Description
28
+
21
29
This error occurs when MSBuild finds different conflicting versions of the same dependent assembly.
22
30
23
-
The full message resembles the following text:
31
+
## Resolution
32
+
33
+
The error output message suggests an appropriate way to resolve the error, if the version mismatch is intentional. The link in the output opens the article, [Enable and disable automatic binding redirection](/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection).
24
34
25
-
```output
26
-
MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
27
-
```
35
+
## Applies to
28
36
29
-
The message suggests an appropriate way to resolve the error, if the version mismatch is intentional. The link takes you to [How to: Enable and disable automatic binding redirection](/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection).
Copy file name to clipboardExpand all lines: docs/msbuild/errors/msb3277.md
+37-19Lines changed: 37 additions & 19 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: "MSB3277: Found conflicts between different versions of 'assembly' that could not be resolved"
3
-
description: "This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the same project."
4
-
ms.date: "03/31/2021"
2
+
title: MSB3277 diagnostic code
3
+
description: Learn about the possible causes of the MSB3277 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3277
@@ -16,15 +16,27 @@ ms.author: ghogen
16
16
manager: mijacobs
17
17
ms.subservice: msbuild
18
18
---
19
-
# MSB3277: Found conflicts between different versions of 'assembly' that could not be resolved
19
+
# MSB3277
20
20
21
-
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the same project. In a .NET build, all assemblies that are referenced, directly or indirectly through other referenced assemblies, have to resolve to the same version. You cannot reference two different and conflicting versions of the same assembly when building the same binary. The error is emitted by the [ResolveAssemblyReference task](../resolveassemblyreference-task.md), which looks at all the referenced assemblies, and all of the assemblies referenced indirectly by those assemblies, and so on, until all assembly references have been resolved.
21
+
This article describes the MSB3277 error code.
22
22
23
-
## Diagnosing the error
23
+
## Message text
24
24
25
-
To diagnose the error, first enable a diagnostic log (use the `-verbosity:diag` command-line switch), and check the MSBuild log file with the full diagnostics output. For bigger output logs on large projects, consider using the binary log (`-bl` command-line switch) and the [MSBuild Structured Log Viewer](https://msbuildlog.com/) to view the output more easily. When this error occurs with MSBuild 16.x or later, the specific versions that are in conflict are written to the log file. If you're using an earlier version of MSBuild, this isn't in the log file, but you can usually follow the dependency chain to find the conflicting reference. Look at each of the assemblies your project references, and which assemblies those assemblies reference, and so on until you find the conflicting version(s).
25
+
`MSB3277: Found conflicts between different versions of 'assembly' that could not be resolved.`
26
26
27
-
The diagnostics log should specify not only which assembly versions were in conflict but exactly why they were considered, that is, there was a reference to *assembly1.dll*, which referenced *assembly2.dll* version x, but there was also a reference to *assembly2.dll* version y, and MSBuild could not figure out which was the right version to use. The following is an excerpt from a diagnostic log showing a conflict between two versions of StreamJsonRpc:
27
+
## Description
28
+
29
+
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the same project. In a .NET build, all assemblies that are referenced, directly or indirectly through other referenced assemblies, have to resolve to the same version. You can't reference two different and conflicting versions of the same assembly when building the same binary. The [ResolveAssemblyReference task](../resolveassemblyreference-task.md) emits this error. The task inspects all the referenced assemblies, and all assemblies referenced indirectly by those assemblies, and so on. The task works through the process until all assembly references are resolved.
30
+
31
+
## Diagnose the error
32
+
33
+
To diagnose the error, first enable diagnostic log output by using the `-verbosity:diag` command-line switch, and then check the MSBuild log file with the full diagnostics output. For longer output logs on large projects, consider using the binary log `-bl` command-line switch and the [MSBuild Structured Log Viewer](https://msbuildlog.com/) to view the output more easily.
34
+
35
+
In MSBuild 16.x or later, the specific assembly versions in conflict are written to the log file. In earlier versions of MSBuild, the content isn't added to the log file. Instead, follow the assembly dependency chain to locate the conflicting reference. Look at each assembly that your project references, and then the assemblies that the initial assemblies reference, and so on. Follow this process until you identify the conflicting assembly versions.
36
+
37
+
The diagnostics log should identify the specific assembly versions that are in conflict and the reasons for the conflicts. For example, a reference to *assembly1.dll*, which references *assembly2.dll* version **x**, but also references *assembly2.dll* version **y**. MSBuild can't determine which version to use for the assembly.
38
+
39
+
The following example is an excerpt from a diagnostic log showing a conflict between two versions of `StreamJsonRpc`:
28
40
29
41
```output
30
42
There was a conflict between "StreamJsonRpc, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "StreamJsonRpc, Version=2.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
@@ -64,26 +76,32 @@ There was a conflict between "StreamJsonRpc, Version=2.1.0.0, Culture=neutral, P
64
76
References which depend on "StreamJsonRpc, Version = 2.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
65
77
```
66
78
67
-
You can also set the `MSBuildDebugEngine` environment variable to 1 to get all possible logs. See[Building MSBuild for the .NET Framework - Logs](https://github.com/dotnet/msbuild/blob/main/documentation/wiki/Building-Testing-and-Debugging-on-Full-Framework-MSBuild.md#logs).
79
+
You can also set the `MSBuildDebugEngine` environment variable to 1 to get all possible logs. For more information, see[Building MSBuild for the .NET Framework - Logs](https://github.com/dotnet/msbuild/blob/main/documentation/wiki/Building-Testing-and-Debugging-on-Full-Framework-MSBuild.md#logs).
68
80
69
-
## Common fixes
81
+
## Resolution
70
82
71
-
Depending on the root cause of the conflict, the fix might be to update the version of an assembly on disk, perhaps by upgrading or reinstalling a NuGet package or SDK. If you simply want to update all packages to the latest versions, you can run the command `Update-Package -reinstall` from the Package Manager Console in Visual Studio. See [Reinstalling and updating packages](/nuget/consume-packages/reinstalling-and-updating-packages). However, it could be that you intentionally have more than one version of the referenced assembly on disk, but your project or one of its dependencies needs to be updated so that it's referencing the latest version of the conflicting assembly that you have installed. The Global Assembly Cache (GAC) might also be a source of a potential conflict, in cases where you are referencing a specific version of an assembly, but the GAC overrides it. See [Global Assembly Cache](/dotnet/framework/app-domains/gac).
83
+
How you resolve this issue depends on your project configuration and assembly dependency requirements:
72
84
73
-
## Third-party components
85
+
- Update the version of an assembly on disk by upgrading or reinstalling a NuGet package or SDK.
86
+
- Update all packages to the latest versions with the `Update-Package -reinstall` command in the Package Manager Console for Visual Studio. For more information, see [Reinstalling and updating packages](/nuget/consume-packages/reinstalling-and-updating-packages).
87
+
- For projects with multiple versions of a referenced assembly on disk, update the project or the dependencies to reference the latest version of the installed conflicting assembly. The Global Assembly Cache (GAC) might also be a source of a potential conflict, in cases where you reference a specific version of an assembly, but the GAC overrides it. For more information, see [Global Assembly Cache](/dotnet/framework/app-domains/gac).
74
88
75
-
If the conflict is in a third-party component, the component might not be supported with the version of the conflicting assembly you're using in your project. Look to the third party to see if they offer an updated, compatible version. If that's not available, the solution might be to downgrade the version of the conflicting assembly you're referencing to match the version that the third party component uses.
89
+
## External components
90
+
91
+
If the conflict is in a non-Microsoft component, the component might not be supported with the version of the conflicting assembly you're using in your project. Check the provider of the other component to see if they offer an updated, compatible version. If a fix isn't available, the solution might be to downgrade the version of the conflicting assembly you're referencing to match the version that the other component uses.
76
92
77
93
## Binding redirects
78
94
79
-
In some cases, your project might specify or might need to specify binding redirects, which force calls to use a specified version of an assembly. See [Redirecting assembly versions](/dotnet/framework/configure-apps/redirect-assembly-versions) to understand how binding redirects work. Visual Studio or settings in project files can enable or disable automatic binding redirection. See [How to: Enable and disable automatic binding redirection](/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection). Check the settings and make sure you understand how and why your project is using binding redirects.
95
+
In some cases, your project might specify or might need to specify binding redirects, which force calls to use a specified version of an assembly. For more information, see [Redirecting assembly versions](/dotnet/framework/configure-apps/redirect-assembly-versions) to understand how binding redirects work.
96
+
97
+
Visual Studio or settings in project files can enable or disable automatic binding redirection. For more information, see [Enable and disable automatic binding redirection](/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection). Check the settings and make sure you understand how and why your project is using binding redirects.
80
98
81
-
## Loading multiple versions of the same assembly
99
+
## Multiple versions of assembly loaded
82
100
83
-
In advanced scenarios, it could also be that you're working with a project that intentionally requires more than one version of the same assembly. You can use special techniques to override the normal assembly loading process to accomplish the goal. See[Resolve assembly loads](/dotnet/standard/assembly/resolve-loads). Be sure to understand and follow the guidance in [Best practices for assembly loading](/dotnet/framework/deployment/best-practices-for-assembly-loading).
101
+
In advanced scenarios, your project might intentionally require more than one version of the same assembly. You can use special techniques to override the normal assembly loading process to accomplish the goal. For more information, see[Resolve assembly loads](/dotnet/standard/assembly/resolve-loads). Be sure to understand and follow the guidance in [Best practices for assembly loading](/dotnet/framework/deployment/best-practices-for-assembly-loading).
84
102
85
-
For a guide on resolving errors with assembly references, see [Troubleshoot assembly references](../troubleshoot-assembly-references.md).
103
+
For a guide on resolving errors with assembly references, see [Troubleshoot assembly references](../troubleshoot-assembly-references.md) and [How the runtime locates assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies).
86
104
87
-
## See also
105
+
## Applies to
88
106
89
-
-[How the runtime locates assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies)
title: "MSB3284: Cannot get the file path for type library 'name' version 'version'."
3
-
description: "This error occurs when MSBuild can't get the file path for a requested type library."
4
-
ms.date: "08/15/2022"
2
+
title: MSB3284 diagnostic code
3
+
description: Learn about the possible causes of the MSB3284 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3284
@@ -18,14 +18,22 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3284
20
20
21
+
This article describes the MSB3284 error code.
22
+
23
+
## Message text
24
+
25
+
`MSB3284: Cannot get the file path for type library 'name' version 'version'.`
26
+
27
+
## Description
28
+
21
29
This error occurs when MSBuild can't get the file path for a requested type library.
22
30
23
-
The message resembles the following, but this text is followed by additional information from the operating system:
31
+
## Resolution
32
+
33
+
Look to the additional information provided by the operating system to determine the cause of the problem. Typical causes include incorrect or invalid GUIDs, incorrect version numbers, or a component isn't installed.
24
34
25
-
```output
26
-
MSB3284: Cannot get the file path for type library 'name' version 'version'.
27
-
```
35
+
Try checking the registry yourself to make sure the requested component is represented. For more information, see [COM registry keys](/windows/win32/com/com-registry-keys).
28
36
29
-
Look to the additional information provided by the operating system to determine the cause of the problem. Typical causes include incorrect or invalid GUIDs, incorrect version numbers, or a component is not installed.
37
+
## Applies to
30
38
31
-
Try checking the registry yourself to make sure the requested component is represented. See [COM Registry Keys](/windows/win32/com/com-registry-keys).
Copy file name to clipboardExpand all lines: docs/msbuild/errors/msb3290.md
+17-8Lines changed: 17 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: "MSB3290: Failed to create the wrapper assembly for type library 'name'."
3
-
description: "This error occurs when MSBuild tries to create the wrapper assembly for a type library, but the operating system returns an error."
4
-
ms.date: "08/15/2022"
2
+
title: MSB3290 diagnostic code
3
+
description: Learn about the possible causes of the MSB3290 build error and get troubleshooting tips.
4
+
ms.date: 04/15/2025
5
5
ms.topic: "error-reference"
6
6
f1_keywords:
7
7
- MSB3290
@@ -18,12 +18,21 @@ ms.subservice: msbuild
18
18
---
19
19
# MSB3290
20
20
21
+
This article describes the MSB3290 error code.
22
+
23
+
## Message text
24
+
25
+
`MSB3290: Failed to create the wrapper assembly for type library "{0}". {1}`
26
+
27
+
28
+
## Description
29
+
21
30
This error occurs when MSBuild tries to create the wrapper assembly for a type library, but the operating system returns an error.
22
31
23
-
The message resembles the following, but this text is followed by additional information from the operating system:
32
+
## Resolution
33
+
34
+
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
35
25
-
```output
26
-
MSB3290: Failed to create the wrapper assembly for type library "{0}". {1}
27
-
```
36
+
## Applies to
28
37
29
-
Look to the additional information provided by the operating system to determine the cause of the problem.
0 commit comments