Skip to main content

.NET MAUI packaging

Your .NET Multi-platform App UI (.NET MAUI) applications must meet specific compilation requirements before you can submit them for scanning.

For instructions for other platforms, see Supported languages and platforms.

Required files

Veracode requires that you submit the DLL and PDB files created when you build your .NET MAUI application to a target environment. Upload these files individually or package them in a ZIP file.

Supported .NET MAUI platforms and versions

You can write .NET MAUI applications, running on .NET 7–8, for the following platforms:

  • Android 5.0 (API 21) or later.
  • iOS 11 or later, using the latest release of Xcode.
  • macOS 10.15 or later, using Mac Catalyst.
note

Veracode does not support .NET MAUI applications written in WinUI3 that target Windows 10 or 11.

Compile a .NET MAUI application

Use the .NET CLI to build each .NET MAUI project you want to compile. Run the following command to build your project:

dotnet build \
--configuration Debug \
-p:BlazorEnableCompression=false \
-p:IsMacEnabled=false \
-p:PublishAot=false \
-p:PublishReadyToRun=false \
-p:PublishSingleFile=false \
-p:PublishTrimmed=false \
-p:SatelliteResourceLanguages='en' \
-p:TreatWarningsAsErrors=false \
-p:TrimmerRemoveSymbols=false \
-p:UseAppHost=false \
-p:WindowsPackageType=None \

:::note[Replace Project.csproj with the name of your project file. Adjust the parameters as needed to fit your deployment requirements.]

After you build the project using the debug configuration, the build process creates a bin/Debug subdirectory. This directory contains subfolders for each target platform.

  • Android: bin/Debug/net6.0-android/
  • iOS: bin/Debug/net6.0-ios/iossimulator-%/
  • macOS: bin/Debug/net6.0-maccatalyst/maccatalyst-%/

When your application does not use platform-specific calls, scan a single package for any target platform.

Create a ZIP file for each package you want to upload to the Veracode Platform. If you are uploading packages for multiple platforms (such as iOS and Android), create and upload a separate ZIP file for each platform to its own application profile.

Important

Ensure the ZIP file contains only DLL and PDB files and does not include subfolders.

MAUI projects do not generate a deps.json file. To get SCA results for MAUI projects, use the SCA agent.