Hello,
Our development environment is:
- Visual Studio 2017 Community 15.2 (26430.6)
- Xamarin 4.5.0.443 (c871575)
- Xamarin.iOS and Xamarin.Mac SDK 10.10.0.30 (30b6e87)
We are trying to include Environment Variables in our monotouch application during debugging. In our iOS test application we have gone to the Project Properties > iOS Run Options screen and for the Debug configuration we have added a test Environment Variable in two ways:
- In the Environment Variables grid
- As parameter options to monotouch: "--setenv:TESTENV=TestEnvValue"
After launching the application on the debugger and waiting for it to launch on our Development MacBook it hits an early breakpoint. From there we have attempted to run System.Environment.GetEnvironmentVariables() in the Immediate Window and only receive "Count = 0" as the output. The System.Environment.CommandLine does not show any additional arguments passed to monotouch.
We have reviewed the following documentation:
- https://kb.xamarin.com/customer/portal/articles/1660072-how-do-i-set-mono-runtime-environment-variables-for-ios-projects-in-xamarin-studio-
- https://developer.xamarin.com/guides/ios/advanced_topics/environment/
This seems unlikely to not be working so we are to know if we've made a mistake here? The documentation does seem to refer exclusively to Xamarin Studio. We are wondering if it is an then possibly an issue with Xamarin for Visual Studio? Please advise on how we can debug this further ourselves.
Regards