Bug 43438 - Changes to referenced project not picked up by referencing project until solution is closed and re-opened.
Summary: Changes to referenced project not picked up by referencing project until solu...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 6.0.2 (C7SR1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: David Karlaš
URL:
Depends on:
Blocks:
 
Reported: 2016-08-16 20:57 UTC by Jon Goldberger [MSFT]
Modified: 2016-09-20 09:35 UTC (History)
4 users (show)

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

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 Jon Goldberger [MSFT] 2016-08-16 20:57:01 UTC
## Description

When referencing a Xamarin Android binding project from a Xamarin Android app project, if I make changes to the binding project and rebuild, the changes are not picked up until the solution is closed and re-opened. Also the namespace for the binding library won't get resolved when the solution is first loaded, but is after building the solution and closing and re-opening the solution. I can understand the initial failure to resolve the namespace as on first load (if the bin and obj files have been deleted) the binding project is not built yet, but I would think that after building the binding project the namespaces would get resolved. But you have to close and re-open the solution for the namespace to be resolved after building the binding project(s). Perhaps this is two bugs, but filing both here as they would seem to be related. 


## Steps to reproduce

1. Open the Sample solution here into Xamarin Studio:
https://www.dropbox.com/s/ri2atdrfq90c6re/Braintree-Droid.zip?dl=0

2. Open the MainActivity.cs file

3. Note that the Braintree namespace is not getting resolved:
>using Braintree.Api;
>using Braintree.Api.Dropin;

4. Build the solution.

Expected result: Braintree namespace will now be resolved.

Actual result: Braintree namespace is still not resolved.

5. Close and re-open the solution

Expected result: Braintree namespace will now be resolved.

Actual result: As expected

6. Now lets make a change to the Braintree.Api.Droid binding project. As it is, there is a warning on building the binding project due to a managed type not being found for a method's arguments. Due to this, the AndroidPay type does not have the two methods that should have been bound. To see, enter the following code in MainActivity.OnCreate:
> var x = AndroidPay.
after hitting the dot there should be a GetTokenizationParameters(...) and Tokenize(...) method shown in the auto complete list. Expectedly, it is not. 

7. Add the Xamarin Google Play Services - Wallet NuGet package to the Braintree.Api.Droid binding project.

8. Rebuild the solution. 

Expected result: After entering 
> var x = AndroidPay. 
I should see the GetTokenizationParameters (and Tokenize) methods. It is worth noting here that if I open the Braintree.Api.Droid reference in the assembly browser, those two static methods do exist in the AndroidPay type now, but auto-complete is not picking them up. 

Actual result: I do not see the GetTokenizationParameters (and Tokenize) methods. 

9. Close and reopen the solution.

Expected result: After entering 
> var x = AndroidPay. 
I should see the GetTokenizationParameters (and Tokenize) methods. 

Actual result: As expected.


## Environment

=== Xamarin Studio Enterprise ===

Version 6.0.2 (build 73)
Installation UUID: ceaba76c-db06-4fbd-b326-f69ea53c3e01
Runtime:
	Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404020011

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 7.3.1 (10188.1)
Build 7D1014

=== Xamarin.Mac ===

Version: 2.8.2.22 (Visual Studio Enterprise)

=== Xamarin.Android ===

Version: 6.1.2.21 (Visual Studio Enterprise)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

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

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: 9.8.2.22 (Visual Studio Enterprise)
Hash: f37444a
Branch: cycle7-sr1
Build date: 2016-07-28 12:17:02-0400

=== Xamarin Inspector ===

Version: 0.8.0.0
Hash: dc081aa
Branch: master
Build date: Tue Apr 26 23:07:44 UTC 2016

=== Build Information ===

Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:36:15-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-lion-cycle7-sr1

=== Operating System ===

Mac OS X 10.11.6
Darwin Jons-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0
    Thu Jun 23 18:25:34 PDT 2016
    root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector 0.8.0.0
Comment 1 xamarin-release-manager 2016-08-18 10:35:36 UTC
Fixed in version 6.2.0.363 (master)

Author: David Karlas??
Commit: aba43266d34335528added64c5fb4aa119dd8706 (mono/monodevelop)
Comment 2 Danish Akhtar 2016-09-20 09:35:51 UTC
I have checked this issue with latest master XS 6.2(build 552) and observed that now this issue is not exists.

>> Issue 1: Braintree namespace will now be resolved, when we build the solution.

>> Issue 2: Add the Xamarin Google Play Services - Wallet NuGet package to the Braintree.Api.Droid binding project, then rebuild the solution. I am getting GetTokenizationParameters (and Tokenize) methods after enter the following code in MainActivity.OnCreate:
> var x = AndroidPay.

Hence closing this issue.

Env info: https://gist.github.com/saurabh360/1553db91f091137ad028fd70577794b2