Bug 9127 - Setting Linker to "Link all assemblies" doesn't get stored in csproj file
Summary: Setting Linker to "Link all assemblies" doesn't get stored in csproj file
Status: VERIFIED DUPLICATE of bug 11885
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-12-23 19:36 UTC by Chris Hardy [MSFT]
Modified: 2016-08-03 15:37 UTC (History)
5 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 DUPLICATE of bug 11885

Description Chris Hardy [MSFT] 2012-12-23 19:36:39 UTC
In a Mono for Android project, setting the Linker Behaviour to "Link SDK assemblies only" sets the csproj value to  "<AndroidLinkMode>SdkOnly</AndroidLinkMode>"
and this is removed when you select "Don't Link" (as expected). However, changing from "Link SDK assemblies only" to "Link all assemblies" also removes the AndroidLinkMode value and closing and opening the project and opening the project causes the Linker Behaviour to be set to "Don't Link" again, incorrectly.

MonoDevelop 3.1.0 (Also reported on 3.0.5)
Installation UUID: bfe4d389-101c-473e-bbcd-d2e0678bb8bb
Runtime:
	Mono 2.10.10 (mono-2-10/a0f2930)
	GTK 2.24.13
	GTK# (2.12.0.0)
	Package version: 210100000
Apple Developer Tools:
	 Xcode 4.5.2 (1847)
	 Build 4G2008a
Mono for Android: 4.4.50
Android SDK: /Users/chrisntr/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
Java SDK: /usr
Monotouch: 6.0.6
Xamarin.Mac: 1.0.10
Build information:
	Release ID: 30100000
	Git revision: 7cf5e00739e7634521d26506b1758bc850f10bca
	Build date: 2012-12-12 04:26:32+0000
	Xamarin addins: 096b543909e9090dcd36b4bff460f2f95b75f67c
Operating System:
	Mac OS X 10.8.2
	Darwin ChrisMacBookAir.local 12.2.0 Darwin Kernel Version 12.2.0
	    Sat Aug 25 00:48:52 PDT 2012
	    root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Comment 1 Mikayla Hutchinson [MSFT] 2012-12-28 08:19:43 UTC
FYI, the default value when the setting is blank is "link all", not "don't link", so your expectation is wrong.

Also, the setting is configuration specific, and can be merged to the root if all the configurations have the same value, so you'll have to be more specific about which you set and which were changed/removed.
Comment 4 PJ 2013-06-27 16:50:14 UTC
So I'm seeing what appears to the the correct expected behavior with XS 4.0.9.12. The <AndroidLinkMode> is removed whenever the linker is set to Link All, and is created / modified to be SdkOnly or None when moving to Link SDK Assemblies only and Don't Link respectively.

So the only issue from the original description seems to be where chrisntr says "and this is removed when you select "Don't Link" (as expected)". The expected behavior is for the <AndroidLinkMode> element to have the value 'None' when set to Don't Link.

RESOLVING as INVALID, although if we do ever want that default to change we can REOPEN I guess.

Mhutch, I'm not sure what we want to do with the proposal in comment 2 but it is not required to resolve the bug so hopefully that proposal won't be lost.
Comment 5 Mikayla Hutchinson [MSFT] 2013-06-27 18:05:42 UTC
Turns out this is a dup of a bug I fixed already, which is why it works for you :)

*** This bug has been marked as a duplicate of bug 11885 ***
Comment 6 Saurabh 2013-07-19 07:20:26 UTC
Today, we have tried to verify this issue and we are seeing following behavior with XS 4.0.10(build 5):

With linker 'Don't link', "<AndroidLinkMode>None</AndroidLinkMode>" appears in csproj.

With linker 'Link all assemblies', "<AndroidLinkMode>Full</AndroidLinkMode>" appears in csproj.

As per bug description:
"Linker 'Link SDK assemblies only' sets the csproj value to 
'<AndroidLinkMode>SdkOnly</AndroidLinkMode>'"  

but now with linker 'Link SDK assemblies only', <AndroidLinkMode> is removed from csproj.


Please suggest whether it is intended behavior or we need to report this as bug.