The problem: no .csproj file in websites
The solution: http://www.dotnetsizzler.com/post/Using-MS-Build-in-ASPNET-Website.aspx Add a proj file to the website, and set up the build to use it. http://en.csharp-online.net/MSBuild:_By_Example%E2%80%94Dealing_with_MSBuild_Errors