-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes when app resumes #10
Comments
@johnsonwangnz Hi, what is your platform that you test it? which version of PCLApp do you use? |
I ma using vs 2017, Android 7.1 -API 25 x86, the place initialization was done is in shared portable resources. I have not tried other platforms. |
ITNOA @johnsonwangnz what is your meaning about 'same initialization'? Did you mean call
If you prevent to reinitializing of Please try this branch from nuget if you have same problem again, tell me please. :) |
Yes I put following code in App constructor in pcl |
@johnsonwangnz : Probably you have a workaround by now or maybe you already have a fix for this. But just so that someone else can get some help out of this, try checking if you already have your namevalue collection loaded before you initialize. ex: if(ConfigurationManager.AppSettings == null) Hope this helps. :) |
Thanks
…On Tue, Nov 21, 2017 at 9:27 AM, SunainaDG ***@***.***> wrote:
@johnsonwangnz <https://github.com/johnsonwangnz> : Probably you have
workaround by now or maybe you already have a fix for this. But just so
that someone else can get some help out of this, try checking if you
already have your namevalue collection loaded before you initialize. ex:
if(ConfigurationManager.AppSettings == null)
ConfigurationManager.Initialise(assembly.GetManifestResourceStream("
DemoApp.App.config"));
Hope this helps. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbK4Z4qZXuct8slyfRxi2AExut3yTymks5s4eClgaJpZM4NXf5b>
.
|
Managed to recreate this. When I put in the null check, it stopped throwing at PCL App.cs level, and threw in MainActivity.cs at: |
@AllFallD0wn Did you write Did you see Usage of library? |
@soroshsabz I was following the usage for Embedded App.Config, not File System App.Config:
This resulted in the above exception when resuming the application |
FOR FILE SYSTEM APP.CONFIG |
@Nick-Case Ok, Please share App.xaml.cs thanks |
@johnsonwangnz Did you problem is resolved? |
@johnsonwangnz Please close issue if your issue was resoled thanks |
First initialization is ok, but after that the same initialization call throws exception
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'ConfigurationManager' threw an exception. occurred
The text was updated successfully, but these errors were encountered: