# 快速开始

准备好开始使用Avalonia了吗？按照以下步骤安装模板并创建第一个应用程序。

## 安装

运行下列命令安装模板Avalonia模板：

```bash
dotnet new install Avalonia.Templates
```

> 注意：.NET 6.0及更早版本，请改用`--install`选项。

## 创建新的应用程序

安装模板后，可以通过运行以下命令创建新的Avalonia应用程序：

```bash
dotnet new avalonia.app -o MyApp
```

这将在您的应用程序目录下创建一个名为`MyApp`的新文件夹。要运行应用程序，请导航到`MyApp`目录并运行：

```bash
cd MyApp
dotnet run
```

就是这样！您的Avalonia应用程序现在已经启动并运行。您可以打开`MyApp`文件夹，开始改进和构建应用程序。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avaloniachina.gitbook.io/avalonia/docs/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
