Xamarin-android: Directory obj/Release-Prod/android/assets contains {nuget package}.dll but no debug symbols file was found

Created on 25 Jan 2019  路  7Comments  路  Source: xamarin/xamarin-android

Steps to Reproduce

  1. Create a new Xamarin Android project.
  2. Add some nuget packages to it.
  3. Update the project's .csproj file to have these property groups: https://gist.github.com/justintoth/deaa2eb0f90029e19b3a69075a99bb27
  4. Build the project.

Expected Behavior

There shouldn't be hundreds of build warnings regarding nuget packages missing a debug symbols file.

Actual Behavior

There are hundreds of build warnings regarding nuget packages missing a debug symbols file.

/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Glide.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Java.Interop.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains LocalyticsXamarin.Android.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains LocalyticsXamarin.Shared.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Microsoft.AppCenter.Analytics.Android.Bindings.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Microsoft.AppCenter.Analytics.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Microsoft.AppCenter.Android.Bindings.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Microsoft.AppCenter.Crashes.Android.Bindings.dll but no debug symbols file was found. (com.rpr.mobile.droid)
/Users/justintoth/Documents/rpr-mobile/android-application/EXEC: Warning: Directory obj/Release-Prod/android/assets contains Microsoft.AppCenter.Crashes.dll but no debug symbols file was found. (com.rpr.mobile.droid)

Version Information

=== Visual Studio Community 2017 for Mac ===

Version 7.7.3 (build 43)
Installation UUID: 1ad4d637-b647-40fd-996b-a691ae953107
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

Package version: 516000221

=== Mono Framework MDK ===

Runtime:
Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit)
Package version: 516000221

=== NuGet ===

Version: 4.8.0.5385

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.1.2
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Version: 2.1.302
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 9.1.5.1 (Visual Studio Community)
Android SDK: /android/sdk
Supported Android versions:
5.0 (API level 21)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.1
SDK Build Tools Version: 27.0.3

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/justintoth/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.9
openjdk version "1.8.0-9"
OpenJDK Runtime Environment (build 1.8.0-9-microsoft-b00)
OpenJDK 64-Bit Server VM (build 25.71-b00, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 7.7.1.0
Hash: 06ceaea1

=== Apple Developer Tools ===

Xcode 10.1 (14460.46)
Build 10B61

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== 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

=== Xamarin.iOS ===

Version: 12.2.1.13 (Visual Studio Community)
Hash: a4332c90
Branch: d15-9
Build date: 2019-01-11 13:08:09-0500

=== Build Information ===

Release ID: 707030043
Git revision: 5896ab2acba037c62271742e9e56b900c96c1d8f
Build date: 2019-01-15 21:18:33+00
Build branch: release-7.7
Xamarin extensions: e5b43ba963b7b407aa5b9f2c59018c32a709e6ab

=== Operating System ===

Mac OS X 10.14.2
Darwin 18.2.0 Darwin Kernel Version 18.2.0
Mon Nov 12 20:24:46 PST 2018
root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64

Log File

https://gist.github.com/justintoth/ce85f82278a672ee06b6faa4babcbb0b

App+Library Build bug

Most helpful comment

Thanks for the report! I was able to reproduce this issue locally. I will record some additional notes from my local testing for the team.

Steps Followed to Confirm

Download the test case attached to this comment, and build the SignAndroidPackage target:

msbuild -t:SignAndroidPackage -p:Configuration=Release AndroidApp1.sln

Actual Behavior

The mono-symbolicate tool emits a warning for any assembly that does not provide debug symbols.

(Setting <MonoSymbolArchive>false</MonoSymbolArchive> stops the warnings because it disables the mono-symbolicate step.)

Version Information

Not a recent regression. I observed the issue with each of the following versions:

  • monodroid/master@77355e8e
  • Xamarin.Android 9.1.5.1 (monodroid/d15-9@234003d1)
  • Xamarin.Android 8.3.3.2 (monodroid/d15-7@dffc5912)

Log File

msbuild.binlog.zip

All 7 comments

Thanks for the report! I was able to reproduce this issue locally. I will record some additional notes from my local testing for the team.

Steps Followed to Confirm

Download the test case attached to this comment, and build the SignAndroidPackage target:

msbuild -t:SignAndroidPackage -p:Configuration=Release AndroidApp1.sln

Actual Behavior

The mono-symbolicate tool emits a warning for any assembly that does not provide debug symbols.

(Setting <MonoSymbolArchive>false</MonoSymbolArchive> stops the warnings because it disables the mono-symbolicate step.)

Version Information

Not a recent regression. I observed the issue with each of the following versions:

  • monodroid/master@77355e8e
  • Xamarin.Android 9.1.5.1 (monodroid/d15-9@234003d1)
  • Xamarin.Android 8.3.3.2 (monodroid/d15-7@dffc5912)

Log File

msbuild.binlog.zip

Guys, would you mind fixing this? It's really annoying for automated builds as it clouds real warnings.

@dellis1972 and @jonathanpeppers, you might be interested in this behavior. Would it be tricky to suppress the warnings only for libraries from NuGet packages and leave them visible for other libraries?

Maybe one option could be to add a new MSBuild item that users could configure to select specific assemblies that mono-symbolicate should skip. It looks like mono-symbolicate currently always takes a directory of assemblies rather than individual assembly paths, so at the moment, excluding the selected assemblies might mean moving them to a subdirectory before running mono-symbolicate and then putting them back afterward, if that's safe to do?

I think the fix would be to make a new <MonoSymbolicate/> MSBuild task instead of using <Exec/>: https://github.com/xamarin/xamarin-android/blob/086b36b2195a9692135e0243c543500a3bc3d5f1/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L2874-L2877

The output from mono-symbolicate appears to just be:

Directory obj/Release/android/assets contains mscorlib.dll but no debug symbols file was found.

I don't know what Regex MSBuild is using, but it makes this message a warning.

That could be downgraded to a message, similar to: https://github.com/xamarin/xamarin-android/commit/92bc70508042af779a7cfa1784115304e5a5dc3b

Release status update

A new Preview version has now been published on Windows that includes the fix for this item. The fix is not yet included in a Release version. I will update this item again when a Release version is available that includes the fix.

The fix is not yet available on macOS. I will update this item again when a Preview version with the fix is available on macOS.

Fix included in Xamarin.Android 10.2.100.7

Fix included on Windows in Visual Studio 2019 version 16.6 Preview 1. To try the Preview version that includes the fix, check for the latest updates in Visual Studio Preview.

Fix not yet available on macOS.

Release status update

A new Preview version has now been published on macOS that includes the fix for this item.

Fix included in Xamarin.Android 10.3.0.33.

Fix included on macOS in Visual Studio 2019 for Mac version 8.6 Preview 1. To try the Preview version that includes the fix, check for the latest updates on the Preview updater channel.

(Fix also included on Windows in Visual Studio 2019 version 16.6 Preview 1 and higher. To try the Preview version that includes the fix, check for the latest updates in Visual Studio Preview.)

Release status update

A new Release version has now been published that includes the fix for this item.

Fix included in Xamarin.Android 10.3.1.0.

Fix included on Windows in Visual Studio 2019 version 16.6. To get the new version that includes the fix, check for the latest updates or install the latest version from https://visualstudio.microsoft.com/downloads/.

Fix included on macOS in Visual Studio 2019 for Mac version 8.6. To get the new version that includes the fix, check for the latest updates on the Stable updater channel.

Was this page helpful?
0 / 5 - 0 ratings