Setup and Configuration
To set up the Analytics Desktop SDK you can choose between:
- Using NuGet package manager.
- Setting up the project manually.
Using NuGet (Recommended)
The easiest way to setup your WPF or WinForms application project is to install the Analytics.Sdk.Wpf NuGet package.
After installing the Analytics SDK, you should be able to find a new NuGet package source added to your nuget.config called Infragistics (Local) that points to “%public%\Documents\Infragistics\NuGet”.
After ensuring you have the Infragistics (Local) feed properly configured by the installer, you can install the Analytics.Sdk.Wpf NuGet package to your application project.
By installing the NuGet package, you will also install the following dependency packages:
- CefSharp.Wpf (87.1.132+)
- SkiaSharp (1.68.0+)
- System.Data.SQLite.Core (1.0.108+)
Note
You need to manually install Microsoft.Data.SqlClient (1.1.3) package in your project to be able to visualize Microsoft Sql Server data.
Using Manual Setup
To setup your project manually you need to:
Add references to the assemblies dropped by the installer at "<InstallationDirectory>\SDK\WPF\Binaries".
Install the following NuGet packages, which AnalyticsView control depends on:
- CefSharp.Wpf (87.1.132+)
- SkiaSharp (1.68.0+)
- System.Data.SQLite.Core (1.0.108+)
- Microsoft.Data.SqlClient (1.1.3+)
To handle the CefSharp.Wpf known issue, please continue reading below.
Handling CefSharp Dependency Package
Your build (if targeting AnyCPU) will be failing after the installation of the CefSharp dependency package.
Note
About the Error: The error description will be: “error : CefSharp.Common will work out of the box if you specify platform (x86 / x64). For AnyCPU Support please follow this link.
To fix this error, you need to add the CefSharpAnyCpuSupport property to your project file as explained in the error’s URL. Just add the following property group to your application’s .csproj file:
<PropertyGroup>
<CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport>
</PropertyGroup>
This is all you need to do to fix the error. You don’t need to apply the other instructions pointed out in the CefSharp’s GitHub issue. Analytics component will make sure to initialize the CefBrowser class when needed.
At this point your project should be set up to display Analytics dashboards.