views:

245

answers:

2

Visual Studio 2010 seems to insist on having this import in web application projects

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

What does this import give us and is it really required?

On a side note if you remove this import with a text editor Visual studio will re-add it.

The reason i am asking is when the project is compiled on a build server that target does nor exists because visual studio is not installed.

+1  A: 

Contains entries for MSBuild C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications

Use the publish option in VS 2010 to create a zip package that you can deploy on your server (MS Deploy)

read this: http://vishaljoshi.blogspot.com/2009/03/how-does-web-deployment-with-vs-10.html

What build server are you using?

Raj Kaimal
I am using team city.
Simon
Copy the contents of the path above and put it in the same path on your bulid server. Ensure .NET 4 is installed on the build server. Try building.
Raj Kaimal
not so easy when a 3rd party owns the build server http://teamcity.codebetter.com/overview.html . But i will ask them
Simon
turns out it is a little more complicated than thathttp://richardsbraindump.blogspot.com/2009/11/how-to-build-vs2010-solutions-using.html
Simon
+1  A: 

We have a situation where our CI build server also hosts some web sites. It doesn't have a version of Visual Studio installed, so the link to the MSBuildExtensions broke our build on the upgrade to vs2010/.net4.0.

It seems like overkill to have to install VS2010 on the build machine if it's not a dev machine as well... could I just install the MSBuild Extension Pack (http://msbuildextensionpack.codeplex.com/) on the build server and have it work out alright? I currently can't verify that this works, but from what I was able to accomplish prior to this post, it seems like a better option than installing VS2010.

-Daniel

DMac the Destroyer
good point daniel. although your post should be a comment not an answer
Simon