Take the 2-minute tour ×

I'd like to rebuild my solution using MSBuild in command line. So far I'm using this command

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

But when I've changed or deleted a file the rebuild fails. I'm getting the following error code

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?)

But when I use the Visual Studio rebuild command, solution builds fine. My guess I'm missing some paramater for MSBuild..

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Is the solution saved before you do the command line build?

Sounds like the solution isn't updated, but when you do a rebuild in VS, it automatically saves the files before the build starts.

share|improve this answer

Your Answer


