Bug 16589 - Not all dependent assemblies are searched for .jars
Summary: Not all dependent assemblies are searched for .jars
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.10.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-12-04 09:51 UTC by Jonathan Pryor
Modified: 2014-03-26 10:20 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Scratch.Bxc16589.zip (25.61 KB, application/zip)
2014-02-05 10:47 UTC, Jonathan Pryor
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Jonathan Pryor 2013-12-04 09:51:16 UTC
Scenario (which needs an actual testcase):

1. Binding Project B generates B.dll to bind B.jar
2. Library Project L references and uses Project B.
3. Application Project A references Project L, but NOT Project B.
4. Build and run.

Expected behavior: B.jar should be compiled into the Application.

Actual results: B.jar is NOT compiled into the application, resulting in java.lang.NoClassDefFoundErrors at runtime.
Comment 3 Jonathan Pryor 2014-02-05 10:47:47 UTC
Created attachment 5979 [details]
Scratch.Bxc16589.zip

Attached sample project Scratch.Bxc16589.zip.

Build, and it fails:

> 	obj/Debug/android/src/mono/com/xamarin/android/DataListenerImplementor.java(8,22): error :  package com.xamarin.android does not exist
> 		com.xamarin.android.DataListener

Edit the Scratch.Bxc16589 project references so that it also references the XamTestBinding project, and it builds successfully.
Comment 6 Alan McGovern 2014-02-12 08:53:41 UTC
As Dean pointed out on IRC, XamarinVS had similar issues and the fix was to nuke their custom resolve code and just rely on the framework to do the right thing (which it does).

Why is it not sufficient to just invoke ResolveAssemblies like a regular build does and retrieve the list of all Nth order dependencies that way?
Comment 7 Atsushi Eno 2014-02-14 04:20:08 UTC
Now we have fix for custom _AndroidResolveAssemblyReferences issue. However this issue still persists for some reason. Maybe we have to change used items or properties to appropriate ones or add more target dependencies.

[master 01cb485, 9e1e1ec]
Comment 8 Atsushi Eno 2014-02-17 05:37:10 UTC
The assembly resolution issue for this particular bug is now also fixed.

[master dd1e576]
Comment 9 Udham Singh 2014-03-26 10:20:17 UTC
I have checked this issue with the sample project attached into comment 3, and it is working fine, it build solution successfully. Hence, I am closing this issue.

Screencast:  http://screencast.com/t/Hj6OOgMe7mm
Environment Info:

Mac OS X 10.9.2
Xamarin Studio: 4.2.3 (build 60)
Xamarin.Android: 4.13.0 (Enterprise Edition)