Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following build targets are defined in .NET for iOS, Mac Catalyst, macOS, and tvOS projects.
Build (Default)
Builds the source code within a project and all dependencies.
Clean
Removes all files generated by the build process.
ComputeAvailableDevices
Queries and returns a list of available iOS or tvOS devices and simulators that can be used with dotnet run.
This target is called automatically by the .NET SDK's dotnet run command to
support device selection via the --device option. It returns a @(Devices)
item group where each device has the following metadata:
- Description: The name of the device (e.g., "iPhone 16 - iOS 26.0" for simulators, "My iPhone 16" for physical devices)
- Type: Either "Device" or "Simulator"
- OSVersion: The OS version of the device
- UDID: The UDID of the device
- RuntimeIdentifier: The RuntimeIdentifier of the device
For example, to list all available devices:
$ dotnet build -t:ComputeAvailableDevices
This target is part of the .NET SDK device selection specification and enables commands like:
$ dotnet run --device UDID
Added in .NET 11.
Run
Builds the source code within a project and all dependencies, and then deploys and runs it
on a default simulator/device. A specific deployment target can be set by using the $(Device) property.
dotnet build -t:Run project.csproj -p:Device=<udid>