Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6230617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:46:53+00:00 2026-05-24T09:46:53+00:00

I have a build that I am trying to do in TFS2010 (server 2008R2)

  • 0

I have a build that I am trying to do in TFS2010 (server 2008R2) and it is not doing what I want it to do. I want the code to build (I have a gated check-in policy) and on successful build I want to run tests(Unit and integration tests) If (and only if) all tests pass I want the build to be deployed to out IIS7 server.

When starting the setup I started by ignoring tests to see if the build and deploy works. After I had this working I am now trying to get a tests to fail and that must prevent the deployment of the site.

In one of my tests (on purpose) I added Assert.IsTrue(1 == 2); and in the log I can see that the build failed but still the site is deployed to my IIS server. I have my MSBuild Arguments set to : /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=RemoteAgent /p:MSDeployServiceUrl=http://111.11.11.111/msdeployagentservice /p:DeployIisAppPath=”MVC – Jack” /p:UserName=APP-107\Administrator /p:Password=xxxxxx /p:Configuration=Release

Why is the deploy still happening even if the test fails and I have the build definition set to “Disable Tests = false” and “Fail build on test failure”

Thank you
Jack

Ps. I there maybe and example out there that explains how to modify BuildProcessTemplate.xaml to stop the deploy on failing a tes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:46:53+00:00Added an answer on May 24, 2026 at 9:46 am

    The MSBuild Activity in the DefaultBuildTemplate.xaml runs before any of your tests do. Therefore it will do the same thing always regardless of your test results. To rectify this, add a MSBuild Activity after the tests in the DefaultBuildTemplate.xaml in the “If Tests Successful” branch and deploy in that activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that I'm trying to build with at least a nominally
I have a solution that I am trying to build in Visual Studio which
I have a simple jQuery script that I'm trying to build upon but I
I'm trying to build something on javascript that I can have an input that
I'm trying to build the simple layout that I have got in the image
I'm trying to build a PHP function that allows me to have an array
I have a make build system that I am trying to decipher that someone
I'm trying to build application that use single config passed by server as non
I have a build that works fine locally, however, will not build within our
I have a system that I am trying to build that matches users up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.