question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't build in Release: Xamarin.AndroidX.Migration.targets(227,9): error : Symbols were found but are not matching the assembly

See original GitHub issue

Xamarin.Android Version (eg: 6.0):

Operating System & Version (eg: Mac OSX 10.11):

MacOS 10.15.3

Support Libraries Version (eg: 23.3.0):

=== Visual Studio Community 2019 for Mac (Preview) ===

Version 8.5 Preview (8.5 build 3178) Installation UUID: 33ba9349-a2e6-4f41-b8f4-0ead5fc49e6e GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 6.14.1.39 (d16-5 / 30e8706b4)

Package version: 608000123

=== Mono Framework MDK ===

Runtime: Mono 6.8.0.123 (2019-10/1d0d939dc30) (64-bit) Package version: 608000123

=== Xamarin Designer ===

Version: 16.5.0.471 Hash: 35aa4889d Branch: remotes/origin/d16-5 Build date: 2020-02-25 00:52:08 UTC

=== Roslyn (Language Service) ===

3.5.0-beta4-20125-04+1baa0b3063238ed752ad1f0368b1df6b6901373e

=== NuGet ===

Version: 5.4.0.6315

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/3.1.200/Sdks SDK Versions: 3.1.200 3.1.102 3.1.101 3.1.100 3.0.101 3.0.100 2.1.701 2.1.700 2.1.505 2.1.504 2.1.503 2.1.302 2.1.301 2.1.4 2.0.0 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 3.1.2 3.1.1 3.1.0 3.0.1 3.0.0 2.1.16 2.1.15 2.1.14 2.1.13 2.1.12 2.1.11 2.1.9 2.1.8 2.1.7 2.1.2 2.1.1 2.0.5 2.0.0

=== Xamarin.Profiler ===

Version: 1.6.12.26 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 11.3.1 (15715) Build 11C504

=== Xamarin.Mac ===

Version: 6.14.1.39 (Visual Studio Community) Hash: 30e8706b4 Branch: d16-5 Build date: 2020-02-20 16:41:47-0500

=== Xamarin.iOS ===

Version: 13.14.1.39 (Visual Studio Community) Hash: 30e8706b4 Branch: d16-5 Build date: 2020-02-20 16:41:48-0500

=== Xamarin.Android ===

Version: 10.2.0.100 (Visual Studio Community) Commit: xamarin-android/d16-5/988c811 Android SDK: /Users/admin/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 7.1 (API level 25) 8.1 (API level 27)

SDK Tools Version: 26.1.1 SDK Platform Tools Version: 29.0.6 SDK Build Tools Version: 29.0.2

Build Information: Mono: c0c5c78 Java.Interop: xamarin/java.interop/d16-5@fc18c54 ProGuard: xamarin/proguard/master@905836d SQLite: xamarin/sqlite/3.28.0@46204c4 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-5@9f4ed4b

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/admin/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25 1.8.0-25 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.5.0.39 Hash: 6fb4c79 Branch: remotes/origin/d16-5 Build date: 2020-02-20 23:25:56 UTC

=== Android Device Manager ===

Version: 16.5.0.71 Hash: 49194e8 Branch: remotes/origin/d16-5 Build date: 2020-02-20 23:26:18 UTC

=== Xamarin Inspector ===

Version: 1.4.3 Hash: db27525 Branch: 1.4-release Build date: Mon, 09 Jul 2018 21:20:18 GMT Client compatibility: 1

=== Build Information ===

Release ID: 805003178 Git revision: bc5bb028e622b0bf8cd8eb52fd97add17f20c9ca Build date: 2020-03-18 15:20:43-04 Build branch: release-8.5 Xamarin extensions: bc5bb028e622b0bf8cd8eb52fd97add17f20c9ca

=== Operating System ===

Mac OS X 10.15.3 Darwin 19.3.0 Darwin Kernel Version 19.3.0 Thu Jan 9 20:58:23 PST 2020 root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

Describe your Issue:

Please see below stacktrace

Steps to Reproduce (with link to sample solution if possible):

Below is the packages I have in my Android csproj project:

  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{43094198-9F89-4143-ACC7-F4A1BE97CB05}</ProjectGuid>
    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <RootNamespace></RootNamespace>
    <AssemblyName></AssemblyName>
    <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
    <AndroidApplication>true</AndroidApplication>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <FileAlignment>512</FileAlignment>
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
    <TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
    <AndroidStoreUncompressedFileExtensions />
    <MandroidI18n />
    <JavaMaximumHeapSize>4G</JavaMaximumHeapSize>
    <JavaOptions />
    <NuGetPackageImportStamp>
    </NuGetPackageImportStamp>
    <AndroidEnableMultiDex>true</AndroidEnableMultiDex>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
    <AndroidLinkMode>None</AndroidLinkMode>
    <AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>
    <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
    <JavaMaximumHeapSize>4G</JavaMaximumHeapSize>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>RELEASE;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
    <AndroidLinkMode>SdkOnly</AndroidLinkMode>
    <JavaMaximumHeapSize>8G</JavaMaximumHeapSize>
    <AotAssemblies>true</AotAssemblies>
    <EnableLLVM>true</EnableLLVM>
    <BundleAssemblies>true</BundleAssemblies>
    <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
    <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Mono.Android" />
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.IO.Compression" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Json" />
    <Reference Include="Java.Interop" />
    <Reference Include="System.Collections" />
    <Reference Include="System.IdentityModel" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.Threading.Tasks" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.Numerics.Vectors" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="CarouselView.FormsPlugin" Version="5.2.0" />
    <PackageReference Include="Microsoft.AppCenter.Crashes">
      <Version>3.0.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.AppCenter.Analytics">
      <Version>3.0.0</Version>
    </PackageReference>
    <PackageReference Include="Plugin.CurrentActivity" Version="2.1.0.4" />
    <PackageReference Include="SQLiteNetExtensions.Async">
      <Version>2.1.0</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.Xamarin.SfPicker" Version="17.4.0.55" />
    <PackageReference Include="Syncfusion.Xamarin.SfChart" Version="17.4.0.55" />
    <PackageReference Include="Syncfusion.Xamarin.SfListView" Version="17.4.0.55" />
    <PackageReference Include="Xamarin.Essentials" Version="1.5.1" />
    <PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.4.11.982" />
    <PackageReference Include="Xamarin.Forms" Version="4.5.0.396" />
    <PackageReference Include="Xamarin.GooglePlayServices.Ads.Lite" Version="71.1720.1" />
    <PackageReference Include="Plugin.InAppBilling">
      <Version>2.0.0</Version>
    </PackageReference>
    <PackageReference Include="AndHUD">
      <Version>1.4.2</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.Work.Runtime">
      <Version>2.3.3</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.Migration">
      <Version>1.0.1</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.AppCompat">
      <Version>1.1.0</Version>
    </PackageReference>
</ItemGroup>

Include any relevant Exception Stack traces, build logs, adb logs:

Target _AndroidXCecilfy:
    Migrated assembly to 'obj/Release/androidx/cecil/CarouselView.FormsPlugin.Android.dll'.
    Migrated assembly to 'obj/Release/androidx/cecil/Com.Android.DeskClock.dll'.
    Migrated assembly to 'obj/Release/androidx/cecil/Com.ViewPagerIndicator.dll'.
    Migrated assembly to 'obj/Release/androidx/cecil/Syncfusion.SfListView.XForms.Android.dll'.
    Migrated assembly to 'obj/Release/androidx/cecil/Xamarin.GooglePlayServices.Basement.dll'.
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : Symbols were found but are not matching the assembly
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader, System.Boolean throwIfSymbolsAreNotMaching) [0x0003c] in <1b16609822914d769fb771c1bb74cd3b>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00060] in <1b16609822914d769fb771c1bb74cd3b>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <1b16609822914d769fb771c1bb74cd3b>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <1b16609822914d769fb771c1bb74cd3b>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <1b16609822914d769fb771c1bb74cd3b>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <1b16609822914d769fb771c1bb74cd3b>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Xamarin.AndroidX.Migration.CecilMigrator.Migrate (System.String source, System.String destination) [0x001c2] in <a0fc649a8e4a40aab84691110eb542cb>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Xamarin.AndroidX.Migration.CecilMigrator.Migrate (System.Collections.Generic.IEnumerable`1[T] assemblies) [0x00012] in <a0fc649a8e4a40aab84691110eb542cb>:0 
    /Users/admin/.nuget/packages/xamarin.androidx.migration/1.0.1/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error :   at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute () [0x000e3] in <1b449a83137d4707a3ad83671affa396>:0 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:36 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
GrupoGMcommented, Sep 5, 2020

If I upgrade Xamarin.AndroidX.Legacy.Support.V4 from 1.0.0.1 to 1.0.0.3 then I have an error while compiling because Mono.Cecil or some dependency is missing. Even updating Xamarin.AndroidX.Migration before other packages the error remains

I have the same issue

1reaction
moljaccommented, Oct 8, 2020

Thanks @mark74 for feedback

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin.AndroidX build error in release mode
I have a Xamarin Forms project for iOS and Android. The iOS app builds in both Debug and Release, but the Android app...
Read more >
Xamarin Android Support Collection errors after updating ...
Just today I updated my NuGet packages in a project. That also updated Xamarin.Forms to version 5.0. After the update the build complained ......
Read more >
my project can pass building in debug mode, but error ...
my project can pass building in debug mode, but error in release mode. In release mode, the error below, how to solve it?...
Read more >
Flutter 1.17.0 release notes
55902 Fix default opacity assignments for unselected and selected icons in NavigationRail (cla: yes, f: material design, framework, waiting for tree to go ......
Read more >
Untitled
English guren no yumiya attack on titan download movie, Android cafe tokyo ... Catastrophic error cannot open source file, Dominion season 1 torrent, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found