I got this error in my build:
System.InvalidCastException:
[A]System.Runtime.CompilerServices.StrongBox`1[Microsoft.Build.Tasks.Git.GitRepository] cannot be cast to [B]System.Runtime.CompilerServices.StrongBox`1[Microsoft.Build.Tasks.Git.GitRepository].
Type A originates from 'System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.2\System.Private.CoreLib.dll'.
Type B originates from 'System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.2\System.Private.CoreLib.dll'.
Types A and B are the same (and cannot be different since only one SPC can be loaded), which means by process of elimination that the GitRepositoryies in the generic parameters are from different ALCs. But the error message does not indicate that. It can be improved by more deeply analyzing the types to see what doesn't fit.
I got this error in my build:
Types A and B are the same (and cannot be different since only one SPC can be loaded), which means by process of elimination that the
GitRepositoryies in the generic parameters are from different ALCs. But the error message does not indicate that. It can be improved by more deeply analyzing the types to see what doesn't fit.