Bug 10769 - Xamarin Studio Removing previous version of application
Summary: Xamarin Studio Removing previous version of application
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.10.1
Hardware: PC Windows
: Low enhancement
Target Milestone: ---
Assignee: Greg Munn
URL:
Depends on:
Blocks:
 
Reported: 2013-02-28 11:19 UTC by Wayne Phipps
Modified: 2014-08-06 08:10 UTC (History)
6 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 Wayne Phipps 2013-02-28 11:19:41 UTC
Description of Problem:
Xamarin Studio Removes previous version of application every time.
This also removes any application data including a Sqlite database which is populated when synced to a server app so we have to re-sync the data every time. This happens every run no matter how insignificant the changes whereas Monodevelop used to do  this less frequently. 

Steps to reproduce the problem:
1. press F5 to Debug

Actual Results:
Application and data are removed before installation of new version

Expected Results:
Only removing the application data when necessary.

How often does this happen? 
All the time

Additional Information:
Comment 1 Miha Valencic 2014-01-08 09:48:07 UTC
I would like this to be changed. It is very annoying that the app is uninstalled every time a small change in code is made. 

Is there a workaround for this perhaps? I guess installing manually with ADB should work (-r), though that cleary looses the benefit of the Xamarin Studio debugger.
Comment 2 Mikayla Hutchinson [MSFT] 2014-01-08 18:07:18 UTC
I'm not sure offhand why we uninstall the older version of the app before installing the newer version. I think it may have been a sanity check to make sure everything was cleaned up. Assigning bug to Android product so we can get a definitive answer.

You can leave user data when uninstalling the app by setting:

Preferences/Options -> Projects -> Android -> Preserve data/cache between application deploys

If your app is reinstalled "every time" it sounds like you disabled fastdev in project options.
Comment 3 Miha Valencic 2014-01-10 03:21:56 UTC
Michael,

The "Preserve data/cache between application deploys" was unchecked by default. After setting this options, the data is preserved. Fastdev is enabled (and is also enabled by default on install).

So now I get the expected result. IMHO, it would probably make sense to enable this feature by default.
Comment 4 Jonathan Pryor 2014-07-28 17:00:41 UTC
Greg: Should we update the default? (That's on the IDE. ;-)
Comment 5 Greg Munn 2014-07-28 18:06:42 UTC
Jon, fixed in monodevelop/master/0643e8a5f3ab76d49fbe18ee246a5ecff59f09a6
Comment 6 Prashant manu 2014-08-05 07:10:16 UTC
We have checked it still shows 'Preserve data/cache between application deploy' 
unchecked by default.

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

Hence reopening this issue.

Environment Info:
Xamarin Studio
Version 5.3 (build 412)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
 Mono 3.6.0 ((no/80b4f74)
 GTK+ 2.24.23 (Raleigh theme)

 Package version: 306000040

Xamarin.Android
Version: 4.16.0 (Business Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
 Supported Android versions:
  2.1   (API level 7)
  2.2   (API level 8)
  2.3   (API level 10)
  3.1   (API level 12)
  3.2   (API level 13)
  4.0   (API level 14)
  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)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 6.0 (6244.6)
Build 6A267n

Xamarin.iOS
Version: 7.4.0.83 (Business Edition)
Hash: ba3e6b5
Branch: 
Build date: 2014-08-01 11:22:22-0400

Xamarin.Mac
Version:

Build Information
Release ID: 503000412
Git revision: 77e042831804079a649ee83092ed36c7c10773a2
Build date: 2014-08-01 06:32:22-04
Xamarin addins: 57e379e6a9454a1c0d97aa3f770e7ae7cc16c522

Operating System
Mac OS X 10.10.0
Darwin Admin-Macs-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Tue Jul 15 23:56:31 PDT 2014
    root:xnu-2782.1.43.0.2~1/RELEASE_X86_64 x86_64
Comment 7 Greg Munn 2014-08-05 11:56:19 UTC
In order to test this you need to ensure that MonoDroid.Deployment.PreserveDataCache is removed from MonoDevelopProperties.xml in ~\Library\Preferences\XamarinStudio-5.0.

The state of the checkbox is preserved as a preference and isn't updated on install.

1. Edit ~\Library\Preferences\XamarinStudio-5.0\MonoDevelopProperties.xml
2. Find and remove the entry for MonoDroid.Deployment.PreserveDataCache
3. Save the file
4. Open XS and display the preferences, the value of "Preserve data/cache between application deploy" should be true.
Comment 8 Nischal 2014-08-06 08:10:19 UTC
We have checked as per comment 7 and the value of "Preserve data/cache
between application deploy" appears true. Also checked with installing XS again.

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

Hence closing this issue.

Environment Info:
Xamarin Studio
Version 5.3 (build 416)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 3.8.0 ((no/9ffca33)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000002

Apple Developer Tools
Xcode 5.1 (5084)
Build 5B130a

Xamarin.iOS
Version: 7.4.0.89 (Business Edition)
Hash: 189801d
Branch: 
Build date: 2014-08-05 19:34:46-0400

Xamarin.Android
Version: 4.16.0 (Business Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		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)
		4.4.87 (API level 20)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Xamarin.Mac
Version:

Build Information
Release ID: 503000416
Git revision: c82f17d61bf17d6aae1f0d7978c60ddc48b8c9ae
Build date: 2014-08-06 06:43:24-04
Xamarin addins: 57e379e6a9454a1c0d97aa3f770e7ae7cc16c522

Operating System
Mac OS X 10.10.0
Darwin Admin-Macs-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Tue Jul 15 23:56:31 PDT 2014
    root:xnu-2782.1.43.0.2~1/RELEASE_X86_64 x86_64