1
votes

Is there a way to trigger the custom deployment targets through a TFS build? We are using TFS 2015 (with VS 2015, git repository) and I started with a Visual Studio build definition template, but the custom targets (UmbracoCms.targets) do not get triggered so the umbraco, umbraco_client, and other folders do not get collected in the deployment to the artifacts folder.

I have gotten the publish profiles from within Visual Studio to work correctly multiple times before.

Specifically, here is my configuration:

  • Solution: $(SolutionPath)
  • MSBuild Arguments: /p:OutDir=$(build.stagingDirectory) /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true
  • Platform: $(BuildPlatform)
  • Configuration: $(BuildConfiguration)
  • Clean: No
  • Restore NuGet: No
  • VS Version: 2015

Cross posted on our.umbraco.com

1
How did you deploy Umbraco targets locally?Cece Dong - MSFT
@Cece-MSFT I worked off of the readme from the NuGet install, but essentially created a filesystem publish profile, that triggered the targets. Doing a local build didn't require the targets because the VS excluded folders were already visible to IIS.mlhDev

1 Answers

0
votes

After more experimenting I found that the below MSBuild parameters published the site as expected (specifically the PublishProfile parameter). I still consider this non-ideal since part of my goal was to create a system where deploying to staging (or production) couldn't be done from Visual Studio without a lot of work and would normally have to go through TFS (for the audit trail). Using the built in publish profiles fundamentally requires the Visual Studio setup I was trying to avoid but I haven't found any alternatives.

/p:OutDir=$(build.stagingDirectory) /p:DeployOnBuild=true /p:PublishProfile=Intranet.pubxml