MAUI Applications
CtrlAlt0K,0K
In Visual Studio: ReSharper | Cover | Cover Application… ReSharper_CoverApplication
In dotCover standalone application: File | Cover Application...
MAUI applications are cross-platform solutions built using the .NET Multi-platform App UI (MAUI) framework, designed to enable developers to create applications for Android, iOS, Windows, and macOS using a single shared codebase.
Currently, dotCover supports:
Windows – WinUI applications targeting .NET 7.0 and later.
With dotCover, you can run coverage analysis for MAUI applications that have PDB information. Note that dotCover is unable to analyze a MAUI application if it uses .NET native tool chain. To run coverage analysis for such an application, you should disable the Compile with .NET Native tool chain option in Visual Studio (via the menu Project | Properties | Build) and rebuild the project.
note
The application or process you choose must have PDB information. Otherwise, dotCover will not be able to record the coverage information. For more information, refer to where to search for PDB information
Do one of the following:
In Visual Studio, press CtrlAlt0K,0K or choose ReSharper | Cover | Cover Application… from the main menu
In dotCover standalone application, press CtrlAlt0K,0K or choose File | Cover Application... from the menu.
Add a run configuration – the configuration that tells dotCover how to run the analyzed application:
Under Cover application, click
Add run configuration.
In the New Run Configuration wizard, choose MAUI and click Next.
Specify application options:
In Packages, choose the application you're going to analyze. If the application you're looking for is missing, click Refresh to update the list.
In Set environment variables, specify the required environment variables. Each variable must be specified on a new line.
Click Save.
Make sure the created run configuration is selected in the New Process Run list.
Optionally, if your application creates a number of processes, and you want to profile only specific ones, create or select process filters in Process filters under Specify coverage options.
Under Run analysis, click Start. dotCover will open the Coverage Controller dialog and then run the selected application.
If the Collect coverage data from start checkbox was selected, the coverage run starts immediately. Otherwise, dotCover waits until you click Start in the Coverage Controller dialog. When the coverage run is started, you can record code coverage.