We use TeamCity (9.0.1) as our build server, but having recently upgraded our ASP.NET MVC solution to use VS2015 and C#6 syntax, I now get the following error message on our
I've had this issue before and I think you can resolve it by logging into the TeamCity directory and deleting all the files in the working directory. Or doing a "clean" of the working directory before you do a checkout. I recommend just deleting the files manually. Also with TeamCity 9.1.6, you don't need the full Visual Studio installed on the server, just the Microsoft Build Tools 2015 (https://www.microsoft.com/en-us/download/details.aspx?id=48159), and then use the "MSBuild" runner type or the "Visual Studio (sln)" runner type.
Finally....we fixed it.
I had to take the following steps on the Build Server:
Not all of the above steps may be strictly necessary, but I would suggest that certainly steps 1. and 5. were definitely required.
HTH
Griff