Bug 35642 - When deploying app from VS frequently get old build
Summary: When deploying app from VS frequently get old build
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: High major
Target Milestone: 4.0.0 (C6)
Assignee: Juan Marcelo Tondato
URL:
Depends on:
Blocks:
 
Reported: 2015-11-06 16:28 UTC by Jason Smith [MSFT]
Modified: 2015-11-10 10:07 UTC (History)
10 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 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 Jason Smith [MSFT] 2015-11-06 16:28:48 UTC
Deploying the app from VS reqults in me getting the previous successful build running unless I do a full rebuild. This is really confusing when debugging.
Comment 1 Jason Smith [MSFT] 2015-11-06 16:47:04 UTC
Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Professional

Visual Basic 2015   00322-40000-00000-AA386
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA386
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA386
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-40000-00000-AA386
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA386
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JetBrains ReSharper Ultimate 10   Build 104.0.20151101.164448
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps   14.0.23309.00 d14oob
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.0.0.1649 (90e1af2)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.27 (9d7074e)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.21 (9ce9e8b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Parmendra Kumar 2015-11-09 10:57:18 UTC
I have tried to reproduce this issue and I have followed all instruction given in but description but I am not sure about how to reproduce it. 

BuildOutput: https://gist.github.com/Parmendrak/f14b3355e03048b9aca2

After Rebuild project BuildOutput: https://gist.github.com/Parmendrak/5caf958abbf0278da264

Please see the provided Build output and let me know if I have missed anything. Could you Please provide us few steps so that I can reproduce this issue at my end.

Thanks.

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081
Installed Version: Enterprise
Xamarin   4.0.0.1676 (11b78c2)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.33 (81fb408)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.43 (74f6a0e)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 PJ 2015-11-09 13:10:42 UTC
The steps here Parmendra would be:

1. Deploy your app
2. Stop the app
3. Make changes to the app that you would be able to clearly see when the app is redeployed
4. Deploy your app

Expected behavior:

The updated app is deployed

Actual behavior:

The older version of the app is deployed, and the new functionality / changes do not exist.


Jason also reports that specifically selecting 'Rebuild' *works around* the problem, so you should be trying to reproduce *without* using Rebuild.
Comment 4 Parmendra Kumar 2015-11-09 15:05:46 UTC
I have tried to reproduce this issue with steps mentioned in comment #3 and not able to reproduce this issue.

Screencast: http://www.screencast.com/t/kmkDQ4AhN

Supplement info before changing the code:

Build Log: https://gist.github.com/Parmendrak/958a91c7fd12d50b4816
Debug Log: https://gist.github.com/Parmendrak/25aa4de50b809c61faa2

Supplement info after changing the code:

BuildLog: https://gist.github.com/Parmendrak/db2e1e3627bb3bc78754
DebugLog:https://gist.github.com/Parmendrak/6b81d9acd496ab1272ca
Comment 5 PJ 2015-11-09 15:16:18 UTC
Jason can you attach the project you were using here, or link to it in GH? Also any info about which types of changes were not re-deploying would help. It might be best to reproduce with your project.
Comment 7 Saurabh 2015-11-09 23:56:42 UTC
I have checked this Issue as per steps mentioned in comment#3. I am getting updated sample on device everytime when deploy on device after making changes in application.

Build Output: https://gist.github.com/saurabh360/bdbf948c63659ee88fd5
Debug output: https://gist.github.com/saurabh360/163bded6f24c35447fcd



Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90150-00969-AA935
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-90150-00969-AA935
Microsoft Visual Basic 2015

Visual C# 2015   00322-90150-00969-AA935
Microsoft Visual C# 2015

Visual C++ 2015   00322-90150-00969-AA935
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-90150-00969-AA935
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

CodeInjector   1.0
Injects code into the currently debugging WPF app.

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft.Pex.VisualStudio   1.0
Pex

NuGet Package Manager   3.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio   2.2.30615.01
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.30615.01
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.30615.01
Profiling support for Python projects.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps   14.0.23309.00 d14oob
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   4.0.0.1678 (a7bde38)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.33 (81fb408)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.45 (e5b575b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 8 Saurabh 2015-11-10 02:14:05 UTC
I am unable to reproduce this Issue on reported build (XVS 4.0.0.1649). It is also working fine with patch build (XVS 4.0.0.1678) as well. hence changing status to Verified. Please reopen it if it is still behaving same"? Also provide me test project or more steps so that I can also reproduce it at my end.
Comment 9 Parmendra Kumar 2015-11-10 06:23:54 UTC
I have checked this issue with  Xamarin.VisualStudio_4.0.0.1681_05df8cfa53305c35d1cc32f5b7df657701062b1d and I am still getting same behavior as mentioned in bug description.

I have followed steps mentioned in comment #3.

Screencast: http://www.screencast.com/t/8e4XOjp8ev

Build Output: https://gist.github.com/Parmendrak/278dac6a0cc67c58ec64
VS IDE Log: https://gist.github.com/Parmendrak/e06281325f90ff18596c
Debug Output: https://gist.github.com/Parmendrak/1b5266c8c32c8058b988

For now reopening this issue.

Please let me know if I can provide more information regarding the same.

Environment info: 

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Enterprise

Xamarin   4.0.0.1681 (05df8cf)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.33 (81fb408)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.48 (62c70ea)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 10 Parmendra Kumar 2015-11-10 07:07:37 UTC
update with more detailed information in respect of comment(9):

I am also able to reproduce this issue with Xamarin.VisualStudio_4.0.0.1676_11b78c2d5ae9c6833debca09a669e2ce439c5064 using device Moto G3 (Android 5.1.1).

But the same issue is working fine with device Samsung Galaxy S6 (Android 5.1.1)
Comment 12 Shruti 2015-11-10 07:55:32 UTC
Hi Jose,

I have tried this issue with Android WebView app and get the same issue on Moto G3 and it is working fine on Samsung Galaxy Note3

>>  did you have more than one device connected at the same time? 
No, we have tried it on single device connected.
Comment 13 Jose Gallardo 2015-11-10 08:30:04 UTC
@Shruti, can you please do the following:

1. Having the Moto G3 connected  open the "Android ADB Command Prompt".
Type :

adb devices -l

and paste the result in a comment, here.

2. Disconnecting the Moto G3, and connecting the Galaxy Note 3, do the same "adb devices -l" and paste the result here?

What I've seen from Parmendra's build log is "AdbTarget = -sZY2222P99S"
If you can also find the AdbTarget value on the Build output when it doesn't refresh to the Moto G3 that would also be great.

Thanks!
Comment 14 Arpit Jha 2015-11-10 09:25:55 UTC
I have checked this issue with Xamarin.VisualStudio_4.0.0.1681_05df8cfa53305c35d1cc32f5b7df657701062b1d and observed that issue is working fine after RESET Moto G3 devices from Device -> Settings -> Backup and Reset.

Screencast: http://www.screencast.com/t/nfUXBHRO

Build Output: https://gist.github.com/Arpit360/8d3392b95b69f17c6761

Note : I have checked the same with VS 2015 and its working fine.

Hence closing this issue

Environment Info:
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Professional


Xamarin   4.0.0.1681 (05df8cf)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.33 (81fb408)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.48 (62c70ea)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 16 Jose Gallardo 2015-11-10 09:42:17 UTC
After some deeper investigation, we found two causes to this issue:

1. The device ID, which was fixed by @jmt on the XVS code.

2. The date time comparison. Thanks @dean for your help with this diagnostic.

Thanks to the reports from Parmendra and Shruti, we identified that there are some issues where the build is actually good, but the files are not deployed to the device.
This is reproducible if the device is ahead of the Windows in the time. In my case, I was able to repro it with the same Moto X 2nd generation I wasn't before, but changing the time to make it not updated automatically, and setting it 15 minutes ahead of my Windows machine. Then the  first build is deployed successfully but the next builds not.

This can be documented for cycle6-baseline, and handled in a better way in a future release.