繁体   English   中英

解决方案重建在命令行中使用MSBuild失败,但Visual Studio重建工作正常

[英]Solution rebuild fails using MSBuild in command line but Visual Studio rebuild works fine

我想在命令行中使用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的一些参数。

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM