views:

591

answers:

1

I have an Asp.Net MVC Web Application that I am developing. I have TeamCity installed on my development workstation, and have been running CI builds on. All has been working fine. I'd like to move TeamCity off of my machine, and onto the new dev/build server that was just delivered. I do not want to install Visual Studio onto the build server. But it seams that msbuild cannot build the Web Application project.

E:\TeamCity\buildAgent\work\48e528785fe346fa\src\Web\Web.csproj(489, 11): error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I've found a few hits on google, but nothing acceptable. Suggestions were to either install Visual Studio, or copy certain directories from Visual Studio over to the server, etc.

What can I do to enable TeamCity to build my project on the dev/build server.

+5  A: 

Looks like copying the file over will definitely work. Have you tried it? Think of the .targets file as a series of definitions for how MSBuild will do its work.

Peter J
It does work, but it feels like I am poluting my build server. I'd be happier if there was a different answer.
JohnRudolfLewis
It's just a supporting file for MSBuild, which is undoubtedly already on the build server. Sorry it wasn't the answer you're looking for! There is undoubtedly a way to move the file from its default location to make it cleaner, though I don't recall it off the top of my head.
Peter J