Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matthew 16 posts 36 karma points
    Jul 28, 2016 @ 20:52
    Matthew
    0

    TFS Build trigger umbraco copy targets

    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
  • Niels Odgaard 14 posts 155 karma points
    Aug 01, 2016 @ 08:01
    Niels Odgaard
    0

    I think if you change Restore Nuget to Yes it should restore Umbraco and Umbraco_client in the build process

  • Matthew 16 posts 36 karma points
    Aug 03, 2016 @ 16:34
    Matthew
    0

    Also at stackoverflow

    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

Please Sign in or register to post replies

Write your reply to:

Draft