Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Invalid IL code in System.Configuration.ConfigurationManager:get_AppSettings (): method body is empty.
When trying to retrieve an app setting from app.config. The key I am looking for is present in the file. Why is this happening?
Visual Studio Community 15 with Xamarin
Windows 10 Pro
<add key="key" value="value"
string key = ConfigurationManager.AppSettings["key"];
The steps to reproduce this are trivial. Enter the appSetting in the app.config and try to extract the value in the code. What is going on here? I get the same error if I try doing this.
Configuration config = ConfigurationManager.OpenExeConfiguration(path to file);
Are you sure you're using Xamarin.Android? Xamarin.Android does not provide System.Configuration.ConfigurationManager, and the only included types in the v1.0 framework directory -- e.g. mscorlib.dll, System.dll -- are:
Could you please attach a repro project?
I have the same error, see attach screen shot.
I think we are confuse by Visual Studio...
We are able to reference System.Configuration.dll in a droid project, with no error/warning until we run our project.
Created attachment 18427 [details]
Screen shoot error
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!
For a full list of assemblies that are supported in Xamarin.Android you can find documentation here:
Thus https://bugzilla.xamarin.com/show_bug.cgi?id=41240#c1 is saying that you cannot add this assembly to your project as it's not supported.