`--self-contained false` doesn't seem to be a valid flag

未关闭 适合新手
#56,970 0 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

维护者通常 1 天内回复

@BillWagner 已经在做这个了。

开始于 2026年11月23日。

  • #57005 来自 @BillWagner —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
82/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp
领域
documentation

调研方向

错误的标志位于 docs/core/deploying/single-file/overview.md 中,在传递 --self-contained false 的 dotnet publish 示例里。请检查该页面的其他发布示例,并确认文档应展示的形式是 -p:SelfContained=false。当文件中的命令已修正,且页面不再暗示无效标志时,即为完成。

由索引模型根据 Issue 内容生成。

描述

dotnet-fundamentals/svc
Type of issue

Code does not work

Description

The docs includes the following command

dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained false

which had me confused, because, even though the command specified to not use a self-contained build, I was still getting an 80mb exe, as if it was self contained. It seems like -p:SelfContained=false is the correct argument as this gives me a much more reasonable, 185kb exe.

See also: https://github.com/dotnet/runtime/discussions/138064

Page URL

https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/deploying/single-file/overview.md

Document Version Independent Id

de677d1f-386a-e4c3-fdd0-6806b3ef2c0e

Platform Id

2f1a1ee6-f476-0835-409f-2cc17a9c022d

Article author

@LakshanF

Metadata
  • ID: e1932751-7c2b-ce92-936e-e97f8581d5fa
  • PlatformId: 2f1a1ee6-f476-0835-409f-2cc17a9c022d
  • Service: dotnet-fundamentals

Related Issues

主要语言
没有语言数据
星标
4.8k
派生
6.1k
平均合并
22 小时 9 分钟
30 天内合并 PR
302

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/docs 的其他 Issue

查看 dotnet/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。