Bug 19508 - Starter size calculated incorrectly
Summary: Starter size calculated incorrectly
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.13.x
Hardware: PC Mac OS
: High normal
Target Milestone: 4.12.4
Assignee: Jonathan Pryor
URL:
: 19569 ()
Depends on:
Blocks:
 
Reported: 2014-05-03 14:05 UTC by Joseph Hill
Modified: 2014-05-13 09:27 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 Joseph Hill 2014-05-03 14:05:39 UTC
The PortableRazorStarterKit is Starter compatible on iOS.  
https://github.com/xamarin/PortableRazorStarterKit

On Android, building with Starter fails with a message that that the starter limit has been exceeded.  (Currently, it reports that user code size is 302933 bytes).

I have not yet been able to isolate why the limit is exceeded; however, I have removed all of the embedded resources, and removed all of the NuGets (and commented out associated references to System.Net.Http in PortableCongress/WebAccess.cs).  Building in Release mode, Xamarin Studio still errors, reporting User code size, 293376 bytes.

But if you look at the files, the total size of the 3 dlls that comprise the app is only 52,224 bytes:

11776 May  3 13:47 AndroidCongress.dll
24576 May  3 13:47 PortableCongress.dll
15872 May  3 13:47 PortableRazor.dll
Comment 2 Jonathan Pryor 2014-05-05 11:20:29 UTC
The reason for the size check failure is because BCL assemblies are being incorrectly counted toward the size computation.

This appears to be a PCL-related bug, e.g. we're checking the code size for System.IO.dll, which isn't a "normal" BCL assembly, but IS a PCL Facade assembly, and that size is counted toward the bundle size.
Comment 3 James Montemagno [MSFT] 2014-05-06 13:27:09 UTC
*** Bug 19569 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Pryor 2014-05-12 12:28:19 UTC
Fixed in master/bc1dd359 and monodroid-4.12-series/630e0504.
Comment 7 Mohit Kheterpal 2014-05-13 09:27:18 UTC
As per comment 3, Bug 19569 is duplicate of this bug. So, to verify this issue I have used attached sample in bug 19569.

Now, I am able to build attached sample in bug 19569 without any error.

Hence closing this issue.

Environment info :
=== Xamarin Studio ===

Version 5.0 (build 866)
Installation UUID: 449f40dd-b3f1-4028-9a6b-cca0d1a2307d
Runtime:
	Mono 3.4.0 ((no/c3fc3ba)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000204

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.3.35 (Starter Edition)
Hash: 9e24c88
Branch: 
Build date: 2014-05-12 19:42:16-0400

=== Xamarin.Android ===

Version: 4.12.4 (Starter Edition)
Android SDK: /Users/360logicaxamarinmacmini/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		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.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.Mac ===

Xamarin.Mac: 1.8.0.7

=== Build Information ===

Release ID: 500000866
Git revision: 89cfcdd28a9a64d4ddc606f8c4f8e6aaafad610a
Build date: 2014-05-12 14:59:13-04
Xamarin addins: e92a35a9280dede5cbdceaaec0c40c06c163546e

=== Operating System ===

Mac OS X 10.8.4
Darwin 360Logicas-Mac-mini.local 12.4.0 Darwin Kernel Version 12.4.0
    Sun Mar 10 18:01:10 PDT 2013
    root:xnu-2050.24.6~1/RELEASE_X86_64 x86_64