Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

MauiProjectResource

Handle
📦 Aspire.Hosting.Maui v17.0.0-preview.1.26565.2
type MauiProjectResource interface {
Resource
}

Methods

methodAddAndroidDevicebuilder
Adds an Android physical device resource to run the MAUI application on an Android device with a specific name and device ID.
AddAndroidDevice(
name string,
options ...*AddAndroidDeviceOptions,
) MauiAndroidDeviceResource
namestringThe name of the Android device resource.
options...*AddAndroidDeviceOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddAndroidDeviceOptions argument.

DeviceId*stringOptional device ID to target a specific Android device. If not specified, uses the only attached device (requires exactly one device to be connected).
MauiAndroidDeviceResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddAndroidEmulatorbuilder
Adds an Android emulator resource to run the MAUI application on an Android emulator with a specific name.
AddAndroidEmulator(
name string,
options ...*AddAndroidEmulatorOptions,
) MauiAndroidEmulatorResource
namestringThe name of the Android emulator resource.
options...*AddAndroidEmulatorOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddAndroidEmulatorOptions argument.

EmulatorId*stringOptional emulator ID to target a specific Android emulator. If not specified, uses the currently running emulator or starts the default emulator.
MauiAndroidEmulatorResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddiOSDevicebuilder
Adds an iOS physical device resource to run the MAUI application on an iOS device with a specific name and device UDID.
AddiOSDevice(
name string,
options ...*AddiOSDeviceOptions,
) MauiiOSDeviceResource
namestringThe name of the iOS device resource.
options...*AddiOSDeviceOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddiOSDeviceOptions argument.

DeviceId*stringOptional device UDID to target a specific iOS device. If not specified, uses the only attached device (requires exactly one device to be connected).
MauiiOSDeviceResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddiOSSimulatorbuilder
Adds an iOS simulator resource to run the MAUI application on an iOS simulator with a specific name and simulator UDID.
AddiOSSimulator(
name string,
options ...*AddiOSSimulatorOptions,
) MauiiOSSimulatorResource
namestringThe name of the iOS simulator resource.
options...*AddiOSSimulatorOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddiOSSimulatorOptions argument.

SimulatorId*stringOptional simulator UDID to target a specific iOS simulator. If not specified, uses the default simulator.
MauiiOSSimulatorResource

The resource builder.

Returns a handle; failures surface later via Err().

Adds a Mac Catalyst device resource to run the MAUI application on the macOS platform with a specific name.
AddMacCatalystDevice(name string) MauiMacCatalystPlatformResource
namestringThe name of the Mac Catalyst device resource.
MauiMacCatalystPlatformResource

The resource builder.

Returns a handle; failures surface later via Err().

methodAddWindowsDevicebuilder
Adds a Windows device resource to run the MAUI application on the Windows platform with a specific name.
AddWindowsDevice(name string) MauiWindowsPlatformResource
namestringThe name of the Windows device resource.
MauiWindowsPlatformResource

The resource builder.

Returns a handle; failures surface later via Err().