Bug 4563 - Project Options Environment Variables are ignored
Summary: Project Options Environment Variables are ignored
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: unspecified
Hardware: PC Mac OS
: Low enhancement
Target Milestone: ---
Assignee: Greg Munn
URL:
Depends on:
Blocks:
 
Reported: 2012-04-20 12:00 UTC by Jonathan Pryor
Modified: 2016-06-07 17:47 UTC (History)
3 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 FIXED

Description Jonathan Pryor 2012-04-20 12:00:14 UTC
The Run/General project options are ignored/meaningless for Mono for Android apps. We should either disable/hide the panel or actually make it work.

For example:
1. Create a new project.
2. Click Project > ProjectName Options
3. In the left-hand tree, select the Run > General entry

The General options includes command-line parameters, which aren't supportable in a Mono for Android app, and a Run in external console checkbox, which likewise makes no sense. Can we hide these?

Then there's the Environment Variables section, which is currently ignored.

These could be supported by taking them and translating them into an appropriate `adb shell setprop debug.mono.env` invocation prior to launching the app:

http://docs.xamarin.com/android/advanced_topics/diagnostics#Mono_for_Android_System_Properties
Comment 1 Greg Munn 2015-04-01 17:07:53 UTC
Updated link for reference
http://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/
Comment 2 Jonathan Pryor 2015-09-17 14:38:26 UTC
It would actually make more sense to generate an environment file:

http://developer.xamarin.com/guides/android/advanced_topics/environment/
Comment 3 Greg Munn 2016-06-07 17:47:24 UTC
Fixed in run-configurations branch. We don't create the environment file though, but the run / general options are now tailored for android apps and provide a way to customise what service / activity is started. There is a BeforeRun option that can be edited manually to invoke a single adb shell command - creating a new enhancement request to be able to handle multiple commands