0
votes

In my solution I have a basic ASP.NET MVC website and a Wix Project. To identify the files that need installed I'm using Heat (a Wix component) to index the build output. This is part of a post-build event. It works perfectly on my local machine when building in Visual Studio 2015.

My problem occurs when checked-in and the CI (TFS Build) builds it. The differences are:

  • The contents of the bin folder is placed directly in the build folder
  • The rest of the website is placed under a new _PublishedWebsites folder

This means many of the references get broken. For example when dropping the _PublishedWebsites folder into IIS breaks (as .net cannot locate the contents of Bin)

After much research on the subject, and many attempts to pass MSBuild parameters, I'm reaching the end of my efforts.

Is there a way for a build in TFS to leave file locations intact without copying and creating new folders?

If not what is the recommended way to get a deployment ready site (in a single folder) from TFS?

1
Ensure that you have not DeployOnBuild defined to true in your project file or in MSbuild arguments - Troopers
Can you share the settings of VSBuild step in your build definition? - Eddie Chen - MSFT
Have you resolved this issue? - Eddie Chen - MSFT
@Eddie-MSFT - Nope. I may need to add some condition depending on dev / CI build - m.edmondson
Can you try adding following arguments to VS Build step in your build definition: "/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"", this will generated a web deployment package. - Eddie Chen - MSFT

1 Answers

0
votes

Adding a Copy Files task to copy bin folder to $(build.artifactstagingdirectory)\_PublishedWebsites, check the screenshot below:

enter image description here