mrbrl / PCLAppConfig

Xamarin.Forms PCL App.Config Manager
Apache License 2.0
21 stars 10 forks source link

app.config in sharedproject and app.config on android/ios projects? #19

Closed jafin closed 5 years ago

jafin commented 6 years ago

Hello,

Reading the docs I am unsure what the approach is when I add the app.config to the shared project. But the iOS/Android projects already have an app.config (with dll bindings). I cannot link add the shared project app.config because one already exists.

mitchellgarner commented 5 years ago

In my case I ended up giving the .config a different name and went the embedded route. Doing that I then used the second method and the string I put into the GetManifestResourceStream method was {core assembly name}.{config file name}

For example my core project was "Sevan.Core" and my config file was "pcl.app.config" so the method call was ConfigurationManager.Initialise(assembly.GetManifestResourceStream("Sevan.Core.pcl.app.config");

jafin commented 5 years ago

Thank you, I'll review what we did and see how that fits forus.