Skip to content

Getting Started

James Clancey edited this page Jun 15, 2021 · 18 revisions

Comet is a few things:

  • a platform agnostic UI toolkit
  • a programming pattern

Installing with .NET MAUI Check Tool

This is a community supported, open source, global dotnet tool intended to help evaluation your development environment and help you install / configure everything you need to build a .NET MAUI application.

Install: dotnet tool install -g redth.net.maui.check

Run: maui-check --preview

This will evaluate your environment and in most cases optionally install / configure missing components for you, such as:

  • OpenJdk / AndroidSDK
  • .NET 6 Preview SDK
  • .NET MAUI / iOS / Android workloads and packs
  • .NET MAUI Templates
  • Workload Resolver .sentinel files for dotnet and Visual Studio Windows/Mac
  • Currently does not install workloads required for WinUI3

For more information and source code, visit redth/dotnet-maui-check

To Make Your Ride More Enjoyable

  1. Install the Comet Project Templates

Open a terminal and run:

dotnet new -i Clancey.Comet.Templates.Multiplatform
  1. Install the VS Code Comet Debug extension

Install the Comet Debug from the Marketplace.

Start a New Project

dotnet new comet -n RideTheComet

.NET MAUI

To launch the .NET MAUI project, you will need to specify a $(TargetFramework) via the -f switch:

dotnet build RideTheComet -t:Run -f net6.0-android
dotnet build RideTheComet -t:Run -f net6.0-ios
dotnet build RideTheComet -t:Run -f net6.0-maccatalyst

Using VS Code

code RideTheComet

Ride the Comet!

Start debugging. With the Comet Debug extension installed you can type CMD + Return.

VS Code should have already selected the iOS project as your startup project, and prompt you to select a simulator from your Xcode installation.

Once running, you can make changes to your view code and your app running in the simulator will update in real-time. Any invalid code will either report an error to you in the output window, or may crash the app and require reboot to get going again. So write good code!

Clone this wiki locally