Commit e9b99f5
authored
Fix ambiguous reference for ExceptionHandling class (#11173)
The latest daily build of the .NET 10 SDK fails to build the msbuild
repo due to the following build error:
```
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1330,41): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs(875,17): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1437,57): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1448,41): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1584,17): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1806,49): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1879,21): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(1879,66): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(2483,44): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(2484,161): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(2493,169): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
/repos/dotnet/src/msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs(2976,41): error CS0104: 'ExceptionHandling' is an ambiguous reference between 'Microsoft.Build.Shared.ExceptionHandling' and 'System.Runtime.ExceptionServices.ExceptionHandling' [/repos/dotnet/src/msbuild/src/Build/Microsoft.Build.csproj]
```
This is due to a conflict in a class name with a new public class from
runtime: dotnet/runtime#109806
Fixed by explicitly defining the namespace to use.
This was found as part of the work on
dotnet/sdk#45435.File tree
2 files changed
+2
-0
lines changed- src/Build/BackEnd
- BuildManager
- Components/ProjectCache
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments