0
votes

So the scenario is that I'm trying to setup TeamCity to check out our ASP.NET solution from an SVN repository and compile it using a Release profile. The checkout from SVN works fine, however compiling the asp.net solution is where things start to fall apart.

The first issue is that TeamCity seems almost bizarrely inconsistent when it comes to compiling. For instance, the first time it checks out the solution and compiles it, everything seems to work fine. However, if I force it to build after that then it gives:

error MSB6006: "aspnet_compiler.exe" exited with code 1.

and fails.

I noticed that this only seemed to be happening on one of the projects in the solution. When I removed the project everything appeared to work fine. Since the above error is no help at all, I resorted to removing parts of the solution until I found the part that (seemingly) was causing the issue.

Initially I was confident that I had identified the problem and so I cleaned everything up and tried to replicate the process from the start. I checked out a clean version and removed the 'problem pages' from the solution straight away. It didn't compile. So I'm scratching my head. It compiled before - why not now?

Anyway by this stage I've burnt a significant amount of time trying to get this up and running. Since the project that it was complaining about was non-critical I just removed the whole thing. So Team City was once again happily building the remaining projects. I leave it alone and move onto the next thing.

I come in the next day and do a force build - and it isn't compiling anymore. It's giving the same error as above but on a different project now!!!

So I'm pulling my hair out trying to work out what's going on here. My questions are:

  1. Why does something that compiles fine in Visual Studio have so many problems in Team City?
  2. Why is the error given by MSBUILD so vague that it's practically useless (and is there any way to get something more useful)?
  3. Why does the solution build fine in Team City one day and not the next?
Do you have any post-build events? Also, have you tried running msbuild from the command line on your local machine or on the build server, if so what is the outcome?Brent Mannering
Management has decided to go in another direction now so I'm no longer working on this. But to answer your questions - No, I don't have any post-build events and no, I haven't tried running msbuild direct from the command line. I am curious about this though so I'll give it go.Adam Jones