Bug 13829 - Cannot disable "Embed assemblies in native code" after ending Trial
Summary: Cannot disable "Embed assemblies in native code" after ending Trial
Status: RESOLVED NORESPONSE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: 4.0.10
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Mikayla Hutchinson [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2013-08-07 15:07 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-08-28 19:48 UTC (History)
2 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:
RESOLVED NORESPONSE

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-08-07 15:07:14 UTC
From http://forums.xamarin.com/discussion/6707/can-t-publish-app-with-indie-license

## Summary

It is not possible to turn off "Embed assemblies in native code" from the GUI after ending a Trial.


## Steps to reproduce

1. Open an Android project as a non-enterprise user.
2. Turn on "Project Options -> Build -> Android Build -> Packaging -> Embed assemblies in native code".
3. Choose "Begin a Trial".
4. Save the project with "Embed assemblies in native code" switched on.
5. Close the project.
6. End the Trial.
7. Open the project, and go to "Project Options -> Build -> Android Build -> Packaging".
8. You will be prompted to start a Trial again. Click "Cancel".
9. The "Embed assemblies in native code" option will be un-checked.
10. Close the project, and repeat step 7. Once again you will be prompted to start a Trial, indicating that "Embed assemblies in native code" is still switched on.


## Result

After step 6, it is not possible to remove `<BundleAssemblies>true</BundleAssemblies>` from the project file via the GUI. This causes an error when creating Android bundles for Release:

error XA9004: Bundling assemblies requires a  Enterprise  license.

----
Another tiny point, perhaps this error message could be updated/reworded to match the GUI?

error XA9004: Embedding assemblies in native code requires an Enterprise license.


## Work-around

Remove `<BundleAssemblies>true</BundleAssemblies>` from the project file using a text editor.
Comment 1 Mikayla Hutchinson [MSFT] 2013-08-07 17:39:56 UTC
I cannot reproduce this with the listed steps with either 4.0.11 or with master. The option is unchecked when I cancel the upgrade/trial, and remains unchecked.

What version are you using?
Comment 3 PJ 2013-11-19 17:06:01 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 4 PJ 2013-12-05 18:36:31 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.
Comment 5 faceoffers28 2016-08-28 18:03:06 UTC
This is still a big problem. http://forums.xamarin.com/discussion/74298/cant-create-apk-file-after-upgrade-to-visual-studio-2015-enterprise-update-3 

To make matters worse, the process just fails without any explanation as to what the problem might be. I just happened to find the fix embedded in an old Xamarin Forums thread. The thread created this ticket.

I am running Visual Studio 2015 Enterprise Update 3 and using Xamarin 4.0.4.4 and Xamarin.Android 6.0.4.0. I am also running Enterprise Xamarin. I never ran any Trial version with Visual Studio, so that's not the issue.

This could be a separate bug, but I have the feeling that this is the same issue.
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2016-08-28 19:48:33 UTC
That does sound like an unrelated issue:

1. This bug was filed against Xamarin Studio, but your new observations are on Visual Studio.

2. If you are running Enterprise Xamarin in Visual Studio, then the "Bundle assembly" feature is included in your license.  A failure when using that feature would therefore suggest to me that something other than the original licensing restriction (from Comment 0) is happening in your case.  I checked briefly on my end using an old standalone "Xamarin Enterprise" license in VS Professional (since by chance I don't have a VS Enterprise installation handy at home this weekend), and the .apk with assembly bundling enabled was created successfully.  There's a chance the built-in Xamarin entitlements in VS Enterprise might be behaving differently from the old standalone licenses or that something else is unique to your test conditions. If by chance you get a moment to file a quick new bug report with some of the following information, the Xamarin team would be interested to investigate:


- Does updating to the more recent versions of Xamarin (XamarinVS 4.1.2 currently on Stable or XamarinVS 4.2.0 currently on Beta) resolve the problem?


- Please collect and attach the diagnostic MSBuild output [1] for the failing build.

[1] See "verbose build output" on https://kb.xamarin.com/customer/en/portal/articles/1675684#verbose-build-output-logs


- Do you get the same problem on a new template "Visual C# > Android > Blank App (Android)" project where you enable Bundle assemblies (or manually add the corresponding entry in the .csproj file)?


- If the template project does not show the problem, then if at all possible, please attach on the new bug report a small, self-contained test case that reproduces the bug with as little code as possible.


- Lastly, if the "Bundle assemblies in native code" setting is not allowing you to un-check it (or if un-checking it and saving the project settings is not properly storing the setting), be sure to mention that symptom on the new bug report too.



Thanks in advance!  (See also https://kb.xamarin.com/customer/en/portal/articles/1910343 for additional details about what to include and some strategies for minimizing test cases.)