The following two warnings appeared in XF/Android projects right after upgrading to VS 15.8.2:
Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly
Failed to read '...\obj\Debug\MonoAndroid81\android\assets\Mono.Android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below.
The project compiles and runs fine.
No warning.
VS 15.8.2
same problem on VSC 7.6.3
Same problem on VSC 7.6.7
Im having The same Issue in Xamarin forms project , Visual Studio after Updating to 15.9
Severity Code Description Project File Line Suppression State
Warning Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly
at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(Disposable`1 stream, String fileName, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly(String file)
same issue here
I'm having this issue in VS15.9.2
warning : Failed to read 'D:\is.Android\obj\Debug\81\android\assets\uore.dll' with debugging symbols. Retrying to load it without it. Error details are logged below.
warning : Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly
warning : at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
warning : at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
warning : at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
warning : at Mono.Cecil.ModuleDefinition.ReadModule(Disposable`1 stream, String fileName, ReaderParameters parameters)
warning : at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
warning : at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
warning : at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly(String file)
The app builds and runs fine but I can't set a breakpoint in my code.
I'm having this issue in VS15.9.2
Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly
在 Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
在 Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
在 Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
在 Mono.Cecil.ModuleDefinition.ReadModule(Disposable`1 stream, String fileName, ReaderParameters parameters)
在 Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
在 Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
在 Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly(String file)
Failed to read 'D:\CoorIdentityMobile\CoorIdentityMobile\CoorIdentityMobile.Android\obj\Debug\81\android\assets\CoorIdentityMobile.dll' with debugging symbols. Retrying to load it without it. Error details are logged below.
symbols not display!
I get this issue (since updating to VS15.9.2) and it seems a clean and rebuild fixes the issue (temporarily).
As soon as you make a change the source files are out of date and no more working breakpoints.
Same behavior as @codan-prices with VS15.9.3 . This kills productivity when working on Forms :(
@pierceboggan are you aware of this bug?
Okay seems like setting DebugType to full like mentioned in:
https://github.com/xamarin/Xamarin.Forms/issues/3137
And after this manually deleting bin and objfolders of android and .NET Standard projekt helps to get debug working without clean every time. But VS still has some issues with highlighting the right lines (or especially only the lines where pointer stands) in editor.
I am having this issue now in VS 2019 16.3.7.
Deleting bin and obj + rebuild all does not solve it.
Any idea?
VS 2019 16.4.2 has this issue as well.
I'm getting a variation of this: "Mono.Cecil.Cil.SymbolsNotFoundException: No symbol found for file" but otherwise the message is the same.
After Migrating AndroidX I am having issue like below
Severity Code Description Project File Line Suppression State
Error Symbols were found but are not matching the assembly
at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters 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() KegID.Android C:\Users\jdj1.nuget\packages\xamarin.androidx.migration\1.0.0\buildTransitive\monoandroid90\Xamarin.AndroidX.Migration.targets 227
I have same issue after Upgrading Xamarin.Essentials to 1.5 from 1.4
Same issue
@pmahend1 I found workaround by using last version of Xamarin Forms 4.4 (4.4.0.991757) and Xamarin.Essentials 1.4.
It is compatibility issue of few nugets with AndroidX, I can't seems to point out which one.
@hardikphd Thanks. Its weird because it builds fine on local machine and fails on AppCenter CI.
I am trying by removing AndroidX nugets for now. Lets see.
If now I will downgrade Forms and Essentials nugets
Update: It gets built in Release mode in _AppCenter_ but not Debug mode. Doing nothing specific in Debug or Release mode actually.
@pmahend1 with Latest Xamarin Forms (4.5) and Xamarin.Essentials (1.5.1) ???
@hardikphd latest Xamarin forms. But I think essentials was not installed. Seems there was an issue with build agent on AppCenter in my case. I had reached out support team
I have the same issue with a dotfuscator enabled, before release i run debug with a dotfuscator enabled, to ensure that a release configuration will build success with obfuscation. I even generated the new DotfuscatorConfigFile, but didn't help, both release and debug falls with the error above.
I have the same issue with a dotfuscator enabled, before release i run debug with a dotfuscator enabled, to ensure that a release configuration will build success with obfuscation. I even generated the new DotfuscatorConfigFile, but didn't help, both release and debug falls with the error above.
https://github.com/xamarin/AndroidX/issues/8
I also wait for a solution.
I tried several changes in "PreEmptive.Dotfuscator.Xamarin.Targets" to run the Task after "_AndroidXCecilfyShrink" but I always get an error.
I have the same issue with a dotfuscator enabled, before release i run debug with a dotfuscator enabled, to ensure that a release configuration will build success with obfuscation. I even generated the new DotfuscatorConfigFile, but didn't help, both release and debug falls with the error above.
xamarin/AndroidX#8I also wait for a solution.
I tried several changes in "PreEmptive.Dotfuscator.Xamarin.Targets" to run the Task after "_AndroidXCecilfyShrink" but I always get an error.
To tell a truth i thought similar - the problem is that obfuscation comes before modifying dll by AndroidX migrator, and somehow i need to move obfuscation after AndroidX manipulations, but my experience is not enough to go so deep. I hope solution will come soon, i also checked does PreEmptive.Dotfuscator.Xamarin.Targets changed since last time, but nothing changed.
In this case the warning is not pointing out anything wrong I believe. The Obfuscation process is probably changing the assembly to such an extent that the debug symbols are no longer valid.
Also the warning does not provide any useful information which would allow a user to fix the issue, other than ignoring the warning. So I added this PR https://github.com/xamarin/java.interop/pull/622 to remove this completely. Its not really needed and is only useful for people who actually develop the Xamarin.Android product.
@dellis1972 but that still doesn't resolve the original issue I believe. I was getting the same warning when working on some app but I was not using any kind of obfuscation. Or is some kind of obfuscation on by default in new Xamarin.Android or Xamarin.Forms project? I mean in the default templates in Visual Studio for Windows.
It happens to me too, but as an error so I can't compile. it comes in Release only. Debug works without any problem
EDIT:
I've installed XamarinAndroidXMigration but nothing changed
EDIT2:
solved disabling dotfuscator, but it's not a real solution of course
Symbols were found but are not matching the assembly
in Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
in Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
in Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
in Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
in Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination)
in Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies)
in Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute() BeachuApp.Android
@elpanas looking at your stack trace I believe you are hitting the following issues https://github.com/xamarin/AndroidX/issues/8. I also believe that the team are looking into that problem.
@elpanas looking at your stack trace I believe you are hitting the following issues xamarin/AndroidX#8. I also believe that the team are looking into that problem.
Top. Currently I think I've solved using this hint:
https://github.com/xamarin/AndroidX/issues/8#issuecomment-572197993
Building works but now the problem is that it gives me an error when I try to create the apk
EDIT:
I've solved even this
cleaning solution,
deleting bin and obj folder
restarting VS
Rebuilding the solution
In my case the problem comes on, only when dotfuscator is enabled. I tried cleaning, closing, opening, tried even to remove one by one a dotfuscator's hints i have in my project, but only disabling dotfuscator resolves an issue. My guess is that an obfuscation must run after all operations, before packaging an apk.
In my case the problem comes on, only when dotfuscator is enabled. I tried cleaning, closing, opening, tried even to remove one by one a dotfuscator's hints i have in my project, but only disabling dotfuscator resolves an issue. My guess is that an obfuscation must run after all operations, before packaging an apk.
I've solved my first issue due to dotfuscator in this way: https://github.com/xamarin/xamarin-android/issues/2120#issuecomment-623097383 as suggested by dellis1972
In my case, it was by manually editing AndroidManifest.xml.
I undid it, and made the changes through the project Properties menu.
Most helpful comment
Okay seems like setting DebugType to full like mentioned in:
https://github.com/xamarin/Xamarin.Forms/issues/3137
And after this manually deleting
binandobjfolders of android and .NET Standard projekt helps to get debug working without clean every time. But VS still has some issues with highlighting the right lines (or especially only the lines where pointer stands) in editor.