Try using msbuild scripts. Msbuild scripts can be specified in Teamcity and you can pass in parameters to customise it as well.
Another good read is Implementing TeamCity for .NET Projects, Part 4: Using Build Scripts by Elegant Code Blogging Community.