Failed to read FormsViewGroup.dll with debugging symbols

So... this error started popping up when I try building as Release on Android.

Failed to read 'C:\Users\gferreira\Documents\Source\Repos\EcoMindMobile\EcoMind\EcoMind.Android\obj\Release\81\linksrc\FormsViewGroup.dll' with debugging symbols. Retrying to load it without it. Error details are logged below.

The details:

1>Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly
1>   at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
1>   at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
1>   at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
1>   at Mono.Cecil.ModuleDefinition.ReadModule(Disposable`1 stream, String fileName, ReaderParameters parameters)
1>   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
1>   at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
1>   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly(String file)

This same error repeats 3 times throughout the build (found in the build log with Diagnostic MSBuild settings).

It seems to be something related to Xamarin Forms itself and linking, though after more hours than I'd like to admit sinked into this, I have no idea how to solve it. It's just warning, and it builds/works despite this, however just disregarding the warning doesn't seem like the best idea.

I didn't change anything in the release configs or nuget packages, it just started appearing out of the blue last week when I archived the solution.

The seemingly classic mscorlob conflict also appears, though this one has been happening for longer (I've been ignoring it as there doesn't seem to be an actual fix?)

1>There was a conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
1>    "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" was chosen because it was primary and "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" was not.

Could they be related? There are Xamarin.Forms references to both versions for some reason. Any ideas? I'm inclined to just start ignoring the warning, because so far things are still working.

Answers

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai

    It's just warning, and it builds/works despite this, however just disregarding the warning doesn't seem like the best idea.

    You mean you could build your project in release mode despite the error?

    1>Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly

    This happens when you have some unfinished local build changes, usually clean and rebuild will fix this issue. Try doing the following steps:

    • Clean your solution.
    • Delete all bin and obj folder in your solution.
    • Restart your VS
    • Rebuild the project.
  • @YorkGo said:

    It's just warning, and it builds/works despite this, however just disregarding the warning doesn't seem like the best idea.

    You mean you could build your project in release mode despite the error?

    1>Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly

    This happens when you have some unfinished local build changes, usually clean and rebuild will fix this issue. Try doing the following steps:

    • Clean your solution.
    • Delete all bin and obj folder in your solution.
    • Restart your VS
    • Rebuild the project.

    Yes, the app works fine (as far as I can tell) despite the warning. I've gone through that exact list a few times already yesterday (and another today just to make sure) and no change.

    The warning seems to show only when I don't have "Use Shared Runtime" enabled in the Android Options (even in the Debug profile).

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai

    Well, if it's only a warning, don't bother with it.

  • TedFalascoTedFalasco USMember

    I had this same issue when building and deploying in Release mode. It was not a problem in Debug. To resolve it, I had to disable linking, which increased the size of my apk considerably (~14MB to ~58MB).

    Unlike the OP, the solution would build, but would not run on a device. It would immediately crash upon initial launch.

    To disable linking:
    Right-click the Android project -> Properties -> Android Options -> Linking -> Select None. I previously had SDK Assemblies Only selected.

Sign In or Register to comment.