alanwales / vsts-resharper-code-quality-task

20 stars 24 forks source link

Azure DevOps with cached CLT throws "This Master Assembly Binder does not know how to load the assembly." #34

Open DrMueller opened 3 years ago

DrMueller commented 3 years ago

To speed up, I've added the CLT directly as a library to the Git repository. When not doing that, but letting the task download the CLT, everything works fine, but when I use the one in the Git repository, I get the following errors:

--- EXCEPTION #1/3 [ArgumentOutOfRangeException] Message = ExceptionPath = Root.InnerException.InnerException ClassName = System.ArgumentOutOfRangeException Data.ThreadLocalDebugInfo = Environment::Create HResult = COR_E_ARGUMENTOUTOFRANGE=80131502 Source = JetBrains.Platform.Core ParamName = assembly ActualValue = "JetBrains.ReSharper.Psi.Cpp, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325" StackTraceString = " at JetBrains.Util.OnError.<>c.<.cctor>b23_0(Exception ex) at JetBrains.Application.Bindings.AssemblyBinderExtensions.BindToMetadataAssembly(IAssemblyMasterBinder th?s, AssemblyNameInfo assembly, MetadataLoader loader, OnError onerror) at JetBrains.Application.Table.Emit.EmitCatalogTables.Assemblies.PreCreateAssemblyForCataloging(AssemblyNameInfo assnameAsRequested, EmitTimeTables tables, IAssemblyMasterBinder masterbinder, MetadataLoader metaloader) at JetBrains.Application.Table.Emit.EmitCatalogTables.<>c__DisplayClass1_0.b0(Lifetime lifetime) "

--- Outer ---

--- EXCEPTION #2/3 [InvalidOperationException] Message = "Failed to read assembly metadata when adding its parts to the catalog." ExceptionPath = Root.InnerException ClassName = System.InvalidOperationException Data.Assembly = "JetBrains.ReSharper.Psi.Cpp, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325" InnerException = "Exception #1 at Root.InnerException.InnerException" HResult = COR_E_INVALIDOPERATION=80131509

--- Outer ---

--- EXCEPTION #3/3 [LoggerException] Message = "Failed to read assembly metadata when adding its parts to the catalog." ExceptionPath = Root ClassName = JetBrains.Util.LoggerException InnerException = "Exception #2 at Root.InnerException"

Interesting enough, I've checked your task and use the same NuGet command to download the CLT in the first place, the command being "nuget.exe install JetBrains.ReSharper.CommandLineTools -source https://api.nuget.org/v3/index.json". I've also directly copy & pasted the content of this folders, so I can't see a difference there.