# 如何修改主程序文件名

在使用dfx build命令编译项目的源代码之前，应验证用于程序源代码的位置和文件名。

例如，如果要为factorial 程序构建容器，并且该程序的源代码位于src/math/factorial.mo中，您应确保在配置文件的Canister部分指定了正确的路径。

例如：

```
"canisters": {
 "myFactorial": {
 "main": "src/math/factorial.mo",
```

请记住，更改程序文件名的配置设置仅会影响dfx build命令在哪里寻找要编译的源代码。在配置文件中进行更改不会重命名文件系统上的任何文件或目录。如果更改主程序文件的路径或文件名，请确保更改项目目录中的名称和位置。


---

# 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://mixdao.gitbook.io/dfinity/san-shou-ba-shou/3.-guan-li-xiang-mu/ru-he-xiu-gai-zhu-cheng-xu-wen-jian-ming.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.
