Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Updated csproj entries which break TeamCity builds #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated csproj entries which break TeamCity builds #13

wants to merge 1 commit into from

Conversation

richardprice
Copy link

I've removed some settings from the various csproj files which seem to have no function other than to break TeamCity builds under msbuild.

@khellang
Copy link
Member

khellang commented Sep 8, 2014

The VSToolsPath is actually used to import Microsoft.WebApplication.targets, look further down. Could you describe how this makes your build fail? Got an error message or stack trace?

@richardprice
Copy link
Author

The version number used breaks the build when built under TeamCity (which has a given msbuild version which may be different to that used by the developer - in my case, the msbuild version on TC was newer). Removing the block altogether has absolutely no adverse effects on the dozen or so Nancy templates based projects I have done this to.

I will replicate the issue under TC and post the error.

@khellang
Copy link
Member

khellang commented Sep 9, 2014

Removing the block altogether has absolutely no adverse effects on the dozen or so Nancy templates based projects I have done this to.

The effect is has is that it won't include the $(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets because of the following condition: Condition="'$(VSToolsPath)' != ''".

Microsoft.WebApplication.targets is effectively what separates a web project from a plain old class library and removing it will affect the build pipeline for the application.

@khellang
Copy link
Member

khellang commented Sep 9, 2014

More specifically, it removes the WPP (Web Publishing Pipeline) which makes it easier to publish web applications using MSDeploy aka. Web Deploy:

The Microsoft.WebApplication.targets file in turn imports the Microsoft.Web.Publishing.targets file. The Microsoft.Web.Publishing.targets file essentially is the WPP. It defines targets, like Package and MSDeployPublish, that invoke Web Deploy to complete various deployment tasks.

See http://www.asp.net/web-forms/tutorials/deployment/web-deployment-in-the-enterprise/building-and-packaging-web-application-projects 😄

@khellang
Copy link
Member

khellang commented Sep 9, 2014

That said, we don't necessarily need to include this in the templates, but it is part of the default ASP.NET web application templates. The solution is (embarrassingly) to install VS on the build machine or copy the targets over. See http://stackoverflow.com/a/3993177/682105 and http://stackoverflow.com/a/5344246/682105.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants