You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在dotnet watch中传递--no-dependencies参数给build命令?

解决dotnet watch传递--no-dependencies参数给build的问题
  • 正确命令格式:
    要让dotnet watch调用build时带上--no-dependencies参数,需要用--分隔dotnet watch和后续build命令的参数,执行以下命令:

    dotnet watch build -- --no-dependencies
    
  • 错误原因说明:
    你之前运行dotnet watch --no-dependencies报错,是因为--no-dependencies是dotnet build的专属参数,并非dotnet watch本身的参数。dotnet watch会把这个参数误认为是要执行的命令名称,导致找不到对应命令,从而抛出"dotnet---no-dependencies does not exist"的错误。

内容的提问来源于stack exchange,提问作者Alamakanambra

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 09:50:15