Other WPF and WinForms APIs
Adjust the log level
You can control the amount of log messages that show up from App Center in the console. Use the
LogLevel API to enable additional logging while debugging. By default, it is set to
ASSERT for the App Store environments and
To have as many log messages as possible, use
AppCenter.LogLevel = LogLevel.Verbose;
The App Center SDK creates a UUID for each device once the app is installed. This identifier remains the same for a device when the app is updated and a new one is generated only when the app is re-installed. The following API is useful for debugging purposes.
System.Guid? installId = await AppCenter.GetInstallIdAsync();
The App Center SDK supports setting a user ID that is used to augment crash reports. To use this capability:
- Configure the App Center SDK by calling
AppCenter.Start(...)as described in the App Center SDK Getting started guide.
- Set a
userIDin the SDK using the following code:
After setting a user ID, you can use App Center's search feature to search for specific crash reports associated with the ID. Learn more in App Center's search documentation.
The value for the user ID is limited to 256 characters. It will be shown with your crash reports but not used for aggregation or counts of affected users.
Disable all services at runtime
If you want to disable all App Center services at once, use the
Enabled property. When disabled, the SDK will not forward any information to App Center.
To enable all services at once again, use the same API but pass
true as a parameter.
You don't need to await this call to make other API calls (such as
The state is persisted in the device's storage across application launches.
Change state of service in runtime
Enable or disable desired services at the runtime with following code:
Check if App Center is enabled
You can also check if App Center is enabled or not.
bool enabled = await AppCenter.IsEnabledAsync();
Check App Center SDK version at runtime
You can get the version of App Center SDK that you are currently using.
The .NET NuGet package is shared with Xamarin and UWP, which have more functionalities.
All the APIs that are not documented for WPF and WinForms in this page will return
false and will not do anything on WPF and WinForms.
The other APIs are visible so that you can use them in a portable library (such as when using the SDK in a Xamarin.Forms application that contains a UWP project), but those extra APIs are not implemented on WPF and WinForms.