Closed adamhill closed 2 years ago
Sounds like one of your referenced assemblies is compiled against Microsoft.Extensions.DependencyInjection
3.1.5
. One option would be to find that assembly and compile it against the update DependencyInjection
assembly.
I don't know what options are available for controlling the migration process. @mattleibow is there any workaround for this?
Is there any tool or script that I can spelunk with? Will the the Nuget Manager tell me in the Dependencies section if I click on them one at a time?
And (looking at packages.config
):
packages.config
to ProjectReferences
(nuget dependencies handling is better)these steps will keep you safe from headaches in the future. Otherwise you will come here more and more often...
AndroidX Migration tooling has been deprecated. It is highly recommended that you complete the migration to AndroidX if you have not.
We will no longer be providing updates or support to the AndroidX Migration tooling.
Version Information
Describe your Issue:
We have had our project migrated to AndroidX for a while. Many App Store releases. While upgrading some Microsoft.Extension Nugets, I now get an error at the Cecilify step when compiling for Android. (iOS is building fine)
Steps to Reproduce (with link to sample solution if possible):
Upgraded the Microsoft.Extension.* hierarchy, via Nuget Package Manager (not the command line) to 5.0.0
Note If I back out Extensions.DependencyInjection to the original v3.1.5, with its dependencies as determained by Nuget. It will compile again.
Include any relevant Exception Stack traces, build logs, adb logs:
Failed to resolve assembly: 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name) at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) at Mono.Cecil.TypeReference.Resolve() at Mono.Cecil.Mixin.CheckedResolve(TypeReference self) at Mono.Cecil.MetadataBuilder.GetConstantType(TypeReference constant_type, Object constant) at Mono.Cecil.MetadataBuilder.AddConstant(IConstantProvider owner, TypeReference type) at Mono.Cecil.MetadataBuilder.AddParameter(UInt16 sequence, ParameterDefinition parameter, ParamTable table) at Mono.Cecil.MetadataBuilder.AddParameters(MethodDefinition method) at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method) at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type) at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type) at Mono.Cecil.MetadataBuilder.AddTypes() at Mono.Cecil.MetadataBuilder.BuildTypes() at Mono.Cecil.MetadataBuilder.BuildModule() at Mono.Cecil.MetadataBuilder.BuildMetadata() at Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _) at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func
3 read) at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata) at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable1 stream, WriterParameters parameters) at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable
1 stream, WriterParameters parameters) at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters) at Mono.Cecil.ModuleDefinition.Write(WriterParameters parameters) at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination) at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies) at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute()'