You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the application App.xaml.cs, I get an exception with the statement
OneSignal.Debug.LogLevel = LogLevel.VERBOSE;
I am using Visual Studio 17.9 and OneSignalSDK.DotN1et 5.1.1
Steps to reproduce?
1. Create the default MAUI app using the VS templates
2. Add OneSignalSDK.DotNet package
3. Add the using statements
using OneSignalSDK.DotNet;
using OneSignalSDK.DotNet.Core;
using OneSignalSDK.DotNet.Core.Debug;
4. After calling InitializeComponent(), add the statement
OneSignal.Debug.LogLevel = LogLevel.VERBOSE;
5. run the debug version with a target of Windows Machine
What did you expect to happen?
I expect the app to run but it fails with an exception
The type initializer for 'OneSignalSDK.DotNet.OneSignal' threw an exception.
@pmoran1947 Thanks for reaching out have you been able to get this to work or are you still running into this issue? How did you add the OneSignalSDK.DotNet package?
@pmoran1947 Thanks for reporting, this is because this SDK doesn't support Windows.
The key part of the error message is:
Exception thrown: 'System.NotImplementedException' in OneSignalSDK.DotNet.dll
Sorry we didn't have this documented well but I would recommend creating a class to route OneSignal calls through, omit calling OneSignal on your Windows builds.
If you are interested in Windows support OneSignal supports it but there isn't an SDK, it requires using Microsoft's APIs and making REST API calls to OneSignal. See OneSignal's Windows App Setup doc for more details.
If SDK support is something you need let us know, we will consider it based on interest.
What happened?
In the application App.xaml.cs, I get an exception with the statement
OneSignal.Debug.LogLevel = LogLevel.VERBOSE;
I am using Visual Studio 17.9 and OneSignalSDK.DotN1et 5.1.1
Steps to reproduce?
What did you expect to happen?
I expect the app to run but it fails with an exception
The type initializer for 'OneSignalSDK.DotNet.OneSignal' threw an exception.
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: