【问题标题】:Solution rebuild fails using MSBuild in command line but Visual Studio rebuild works fine解决方案重建在命令行中使用 MSBuild 失败,但 Visual Studio 重建工作正常
【发布时间】:2011-01-13 02:15:33
【问题描述】:

我想在命令行中使用 MSBuild 重建我的解决方案。到目前为止,我正在使用这个命令

C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe d:\WorkCopy\AppServer.sln /t:Rebuild

但是当我更改或删除文件时,重建失败。我收到以下错误代码

Ulohy\GetUlohy.cs(27,33): error CS0246: The type or namespace name 'PocitacZaznamov' could not be found (are you missing a using directive or an assembly reference?)

但是当我使用 Visual Studio 重建命令时,解决方案构建得很好。我猜我缺少 MSBuild 的一些参数..

【问题讨论】:

    标签: .net visual-studio visual-studio-2008 msbuild


    【解决方案1】:

    在进行命令行构建之前是否保存了解决方案?

    听起来解决方案没有更新,但是当您在 VS 中进行重新构建时,它会在构建开始之前自动保存文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-27
      • 1970-01-01
      • 2019-11-05
      • 2015-10-04
      • 1970-01-01
      • 1970-01-01
      • 2012-01-03
      • 1970-01-01
      相关资源
      最近更新 更多