Getting Started with TFS Deployer

UPDATE: This is old content, you can find updated (and much more accurate content) over at the TFS Deployer project homepage.

Earlier this year I announced the availability of TFS Integrator, a continuous integration and dependency replication engine for Team Foundation Server. Since then we haven’t been idle, in fact we have been working on another tool that will save you time in your release management processes.

Introducing TFS Deployer

TFS Deployer is installed as an agent on your test and production systems and supports the execution of PowerShell scripts when an event happens in TFS. In particular it listens fo build quality change notificaions which occur when you change the quality of a build under the Team Builds node of Team Explorer.

The way it works is that the release manager, using Team Explorer updates the build quality indicator in the build store via Team Explorer (1), the build store then notifies the event service (2) which in turn distributes notifications to all the event subscribers. In this case you can have one or more TFS Deployer installations listening across multiple machines (3). When TFS Deployer is notified it doesn’t initially know whether it needs to do anything. To determine this it grabs a deployment mapping file from a well known location in the version control store (4).

The deployment mapping file lists out each of the servers and what that server should do in the event that a build is transitioned from quality state to another. What happens is encapsulated in a PowerShell script file (*.ps1) and once that script file is identified TFS Deployer will instansiate a PowerShell host environment and execute the script (5).

Since we finished implementing TFS Deployer Readify has been using it internally along with TFS Integrator to enable us to rapidly modify, build and deploy our timesheeting system. In the remainder of this post I am going to walk through what you need to do to get up and running with TFS Deployer.

Installing TFS Deployer

Before installing TFS Deployer you first need to download and run the setup package. The setup package is a small MSI that simply drops the program files and the default configuration files into the C:\Program Files\TFS Deployer directory – from there you need to perform a few configuration steps which we haven’t fully automated yet.

The first step is to get the service to self register. This is done by executing the TFSDeployer.exe program with the -i switch. Once this is done, open the services MMC snap-in (services.msc) and scroll down to the TFS Deployer service. Change its logon behaviour to use an account that has access to Team Foundation Server.

Before starting the service review the settings in the TfsDeployer.exe.config configuration file, the relevant settings are:

  • FromAddress; this is the address that all e-mails are sent from.
  • SmtpServer; this is the address of the SMTP server that e-mails are sent via.
  • ToAddress; this is the default address that TFS Deployer users to notify when a build either succeeds or fails.
  • BaseAddress; this is the address that Team Foundation Server will use to contact this TFS Deployer instance. This address should be addressable from across the network so localhost is not acceptable.
  • RegistrationUserName; this is the name of the account that the process is running under and which the subscriptions will be assigned against in Team Foundation Server.
  • TeamFoundationServerUrl; this is the address at which TFS is addressable across the network.
  • UseDefaultCredentials; should always be true unless you are using TFS Deployer in a cross domain configuration.

Once you have updated the configuration file you can start the TFS Deployer service. At this point in time TFS Deployer will connect to Team Foundation Server and subscribe to all build quality indicator change notifications.

Preparing Deployment Scripts

Deployment scripts are associated with specific Team Build Types and are designed to be triggered when the build quality indicator transitions from one state to another.

The configuration information which controls whether an instance of TFS Deployer springs into action is stored under version control in a Deployment sub-directory under each Team Build Type directory. For example, in the screenshot below we have a Team Build Type called CrmOnTimeContinuous which is part of the CrmOnTime team project, so the path that TFS Deployer will look for its configuration/scripts is $/CrmOnTime/TeamBuildTypes/CrmOnTimeContinuous/Deployment.

The DeploymentMappings.xml file quite simply lists out which script to execute on what computer when it transitions between two states. It also lists the e-mail address to send a notification to when the script succeds or fails. The screenshot below is a sample script.

TFS Deployer will download this file and if it has a match it will pull down the rest of the files in the Deployment directory and hen execute the script that was specified. In this case it would execute UnexaminedToTest.ps1. What the PowerShell script does is completely up to you, but one of the interesting things to note is that the BuildData (refer to Team Foundation Server SDK) object is actually exposed to the script and the script below shows how to exploit that so the script can grab the files from the drop location.

Once you have the script writen you are ready to test it out, hopefully it works as well for you as it does for us. If you have any issues using TFS Deployer please send me an e-mail or leave a comment against this post and I will help diagnose the issue.

Credits

TFS Deployer was the product of several people putting in hours above and beyond the call of duty. I’d like to thank Chris Burrows for building the core of TFS Deployer and extracting out a common TFS Listener component, and I’d like to thank Geoff Appleby for doing some of the early analysis around how to best integrate with PowerShell. Finally I’d like to thank Darren Neimke for letting us try out this deployment solution on one of his internal projects.

85 thoughts on “Getting Started with TFS Deployer

  1. Pingback: Keyvan Nayyeri : TFS Deployer

  2. Andreas Öhlund

    First of all: Thanx for tfsintegrator! What a great tool!!

    Some thoughts on tfsdeployer:
    We are currently using branches for our different “deployment levels”, eg. trunk -> integrationtest->acceptancetest->release. And we have builds defined for each branch and are using the msbuild-scripts for deploying to the corresponding servers. I think this is quite similar to your tfsdeployer solution where builds are getting deployed when “build status” is changed.

    What are your thoughts on the different approaches?

    Can you see any benefits from combining the two?

  3. Mitch Denny Post author

    Hi Andreas,

    I’ve avoided using branches that live forever like that and often wonder who it really benefits. The reason I use TFS Deployer to trigger on quality status changes is because I don’t have to rebuild and I use the same set of stable binaries getting promoted through the systems.

    If you actually use what is effectively a different code base at each level of the environment what is the point of testing?

  4. Andreas Öhlund

    After some thinking I realize a big advantage with tfsdeployer, the ability to run scripts directly on the target servers, we are only deploying web-apps so our deplymentare as easy as copying some files to a share. But for more complicated deployment eg. biztalk-solutions our approach will not do it. But I still belive there is an advantage to use branches also because it gives you the ability to cherry pick changesets and merge them through the different testlevels (which whould be nessesary to handle critical bugs found in release code that needs to be fixed immediatly with out disturbing planed work in the “Trunk”).

    Well I really like tfsintegrator so I will take tfsdeployer for a spin in our environment.

    Keep up the good work!

  5. Manish

    Would like to Thank for tfs integrator that is a very useful tool and easy to configure.

    Still in process of using TFS Deployer ..

    Is there a way to run some deployment verification test after deployment is done using TFS Deployer

    Thanks
    Manish

  6. karthik

    Hi,

    I tried installing TFS Deployer and found error while trying to execute TFSDeployer.exe -i. Kindly help me in this issue.

    Regards
    Karthik

  7. Jason

    Have you had any problem with TFS deployer retriggering itself after the deployment is done? I have a trigger on quality change from “Unexamined” to “Ready for Int”, and although I get only one quality change notification (on an e-mail subscription directly within TFS) the build runs twice – once at the expected time and once two or three hours later.

    Is there any kind of misconfiguration that can trigger this sort of behavior?

    Thanks,
    Jason

  8. Jason

    Yes, I’m sure. To say build was a misstatement, I meant the deployment runs twice – once at the expected time and once two or three hours later.

  9. karthik

    Hi all,

    The error was that, after installing the TFS Deployer , i tried running the TFSDeployer.exe -i, then i found this error saying “TFSDeployer has encountered a problem and needs to close , we are sorry for the incovenience” in the VS command prompt there was an error saying “Unhandled exception: “System.Configuration.ConfigurationErrorException:Configuration system failed to initialize….”

    Thanks in advance
    Karthik

  10. Dana Hanna aka Software Jedi

    Several pre reqs for using this, I had to decompile to solve most of my problems:
    – .net 3.0 runtime
    – powershell
    – execution policy through powershell set to unsigned, or sign your scripts

    Mitch – wondering if you could release the source for this!

  11. Pingback: TFS and VSTS Developer addins - Software Development

  12. Matthew

    I haven’t had the chance to fully test this, but I assume that this could be used to deploy SQL DB changes to remote systems as well?

  13. dave zimmerman

    Is there any documentation for this other than this posting? I’m looking for a sample DeploymentMappings.xml other than the cut-off graphic in this article.

  14. Mitch Denny Post author

    Hi Dave,

    The image isn’t actually cut off, its just the template that I am currently using on my blog, you can get the whole image directly here:

    Hope this helps. If you have any further problems feel free to ping me with your configuration problems at mitch.denny@readify.net – thanks!

  15. Aleem John

    Deployment folder is not visible in Built Type after installing and configuring TFS Deployer.please guide me how to bring Deployment folder and XML file for automatic deployment ……….?

  16. Aleem Jan

    Q.1. i am not expert in power shell scripting ,please guide me how can i get complete script of powershell for Deployment and Restarting IIS on remote computer.
    Q.2. on publishing Application Through VS it first make dll’s of .cs files and then transfer these dll to webserver . From the script given at your site it seems as it transfter all the .cs files to the server.please explain what Files are transfered by TFS Deployer.

    Thankyou
    Mitch Denny

  17. Aleem Jan

    after installing TFS Deployer when i tried to ‘Build Team project ‘,Team build failed the error was :“D:\BuildShare\Pharmacy\PharmRelease\BuildType\..\Sources\Pharmacy-branch\Pharmacy.sln” was not found”. .Then i made another Team Build Type but still i found the same error on making Team Build ,Please Respond me as soon as possible to solve my problem.
    Thank you.

  18. Mitch Denny Post author

    Hi Aleem,

    Have you modified your TFSBuild.proj file at all? It also might be worth wiping the workspaces on the build server (take a backup).

  19. Shah Khalid

    hi,
    i have Installed TFS Deployer ,configure it i.e Make Deployment Folder in Team Build and Put Xml and Script file in it(change it according to my requirements), and then make team build of project, after this i changed Quality from “unexamined” to “Deployed” but it did nothing………. as it is mentioned above that “Deployment scripts are associated with specific Team Build Types and are designed to be triggered when the build quality indicator transitions from one state to another.”,
    can any one explain its reason and what step should i follow to trigger the event so that it work.
    Thanx in advance..

  20. Mitch Denny Post author

    Hi Shah,

    The first step would be to run TFS Deployer in diagnostic mode to see if it is getting the notifications from TFS. To do this stop the TFS Deployer service, then go to the console and type the following:

    TFSDeployer.exe -d

    Let me know what happens.

  21. Shah Khalid

    i stopped TFS Deployer service and then execute this “TFSDeployer.exe -d” command it prompts a message:
    HIt enter to stop the service. when i hit Enter key ,it exit from here.
    please let me know what does it indacates and what further should i do ? .

  22. Mitch Denny Post author

    Hi J,

    The event data that gets sent through does have access to this information, although we don’t pass it through to the PowerShell scripts. Are you trying to govern who can cause scripts to execute – if so e-mail me and we’ll talk about getting a new build of TFS Deployer out to you (we actually have this feature in a newer build internally).

    mitch.denny@readify.net

  23. Dave Comfort

    Back on 4/24/07 Jason reported a problem with deployments happening more than once (one expected and another unexpected one some time later). We are also seeing the same behavior. I am wondering if you have a newer version of TFSDeployer that addresses this problem?

    Thank you!

  24. Mitch Denny Post author

    Hi David,

    Basically this problem could be due to duplicate subscription entries. We do have new build of TFS Deployer available if you want it, but I would check your service subscription entries first. TFS Deployer typically cleans itself up, but it can get confused if it has been run as two different accounts.

  25. Pingback: Upcoming User Group Presentations « TFS Now

  26. Rob Gibbens

    Mitch,
    Is there something that needs to be setup for the BaseAddress to be addressable on a certain port, or is that handled in the install? The sample config file has http://:8899.
    Also, is there anything that I need to do other than create the “Deployment” folder in source control, and add the mapping file and the script file to source control (with the correct content)? Is simply adding it to source control from a workstation enough for TfsDeployer to pick it up?
    Thanks, Rob

  27. Mitch Denny Post author

    Hi Rob

    We use WCF under the covers, so we just pass this address along to it, and it tries to set it up. You may need to adjust some firewall settings if your have them. Other than that TFS deployer just reads the deployment folder.

  28. BJHop

    Mitch,

    I am seeing a strange behavior that I am trying to explain. When I create a new buildtype and run that build. Once the build is successful the build changes the build quality to Deploy2-Dev; which will kick off the deployer to get the build to our Dev area. The issue happens when the said buildtype does not have a deployment folder (therefore not mappings or SP scripts) set up yet, nonetheless when the build run it still updates build quality. I do this to prove the build is good before I start writing the TFS Deployer scripts. Well what seems to happen is that TFS Deployer runs whatever scripts have been pulled down to C:\Documents and Settings\TFSBuild\Local Settings\Temp\TFSDeployerConfiguration2 from the previous deployer run of another buildtype.

    It there some setup or config item I am missing I thought that you needed to have the Deployment folder in the build type for the Deployer to run?

    Any ideas would be greatly appreciated.

    Thanks,

    BJHop

  29. Mitch Denny Post author

    Hi BJHop,

    Does adding a deployment folder fix the problem? I wonder if something happening in previous runs is causing an error and stopping the deployment files getting cleaned up.

  30. BJHop

    Yeah,

    I guess I could just add the Deployment folder and blank mapping file to which would clear up any issues with the wrong scripts being run. One thing to note is that a couple of weeks ago the server running TFS (single server install) did have its C drive fill up and crashed hard. Since this happend I’ve been having a few strange issues with the build box (where the TFS Deployer is installed) and TFS still being one of them.

    Thanks a million

    BJHop

  31. Mark

    While the original discussion happened quite some time ago….
    I’m having the problem where TFS Deployer is re-running scripts multiple times. It even seems to run them when I do a build (not just when the build quality changes) – and then even runs scripts from different builds. Only certain scripts seem to cause this problem – I’m still trying to hunt down the issue.

    -Mark-

  32. Mark

    Now TFS Deployer is running scripts when someone starts a build….
    It ran the script once for todays build #2, and twice for build #6 – all at the same time when someone started build #7.

    -Mark-

  33. Linkspeed

    Hi, I got 3 questions about TFSDeployer.

    When I run tfsdeployer, TFS shows event subscription to http://123.45.67.22:8899/BuildStatusChangeEvent/BuildStatusChangeEvent/
    base address is set to http://123.45.67.22:8899/ in configure file.
    Why there are two “BuildStatusChangeEvent”?

    Can I make TFSDeployer to add event subscription only at the first time it runs and not to delete when tfsdeployer exits.

    also where is the log file after I specified

    Thanks
    Linkspeed

  34. Aaron Corcoran

    Alright, I must be missing something. I extracted the .msi, installed the .exe with the -i flag, modified the config file (however, I must admit, I had no idea what to use for the base machine…is this supposed to be my local machine (windows xp) or the TFS server)? I’d assume my local machine, but either way, once I saved the .config, the service would fail to start.

    Wasn’t sure in what part of the process I’m failing. Yes, I’m a newbie at this, so pardon my questioning so early on in the process. I will struggle with it some more, but hopefully an answer shall arise.

  35. Pingback: Best documentation yet for TFS Deployer « notgartner

  36. Siddharth Sureka

    I am attempting to install the TFSDeployer in an environment that points to a TFS 2K8 and not a TFS 2K5 install. I am recieving an error when trying to run the diagnostic mode ( -d). Any idea what I am doing wrong?

    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
    embly ‘Microsoft.TeamFoundation.VersionControl.Common.Integration, Version=8.0.0
    .0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies
    . The system cannot find the file specified.
    File name: ‘Microsoft.TeamFoundation.VersionControl.Common.Integration, Version=
    8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
    at Readify.Useful.TeamFoundation.Common.Listener.TfsListener.RegisterEventLis
    teners()
    at Readify.Useful.TeamFoundation.Common.Listener.TfsListener.Start()
    at TfsDeployer.Program.OnStart(String[] args)
    at TfsDeployer.Program.Main(String[] args)

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\M
    icrosoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure lo
    gging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
    ion!EnableLog].

  37. Mitch Denny Post author

    Hi Siddharth,

    TFS Deployer hasn’t been tested against TFS2K8. But what you might be able to do is put in some binding redirects in the configuration file so that it can load the TFS2K8 assemblies instead of the TFS2K5 ones.

  38. John S

    Is there a license agreement for TFS deployer? We are seriously looking at this software but just want to make sure there are no legacy clauses we need to be aware of.

  39. Scott Taylor

    TFS Deployer works with TFS 2008 RTM. I do however have Team Explorer 2005 installed on the TFS deployer machine and not the 2008 version.

    To use TFS Deployer with TE 2008 you may be able to add assembly redirects but I have yet to test it.

    This seems like a easy solution for me🙂

    Note: I am seeing some duplicate script runs and I’m pretty sure I have the updated agent.. more testing to come.

  40. Brian S

    First let me say, Great Tool! It has made my life much better since implementing this. I have an unusual situation with a cross-domain environment. I am trying to use the UseDefaultCredentials section in the config file. I would like to set it to false and set the domain\user in which I want the service to communicate with. However, it appears the service does not read this config section or it simply ignores it. It will only communicate with the user the service is running under. Am I missing something?

  41. Mitch Denny Post author

    Hi Brian, I’d probably need more information to make a really good diagnosis. But its probably all down to Windows authentication. If you are going cross domain, the trusts need to flow the right direction. Sometimes it is easier to use local accounts on the TFS and deployment servers to make it work.

  42. Aaron Corcoran

    Alright, having a crazy time trying to figure one thing out using TFS Deployer with TFS 2008. Since they have changed the default build quality to be null or blank (can’t tell) instead of ‘unexamined’, I’m having a heck of a time figuring out what the ‘originalbuildstate’ in the mappings file should be.

    I’ve tried OriginalQuality=”” and that doesn’t seem to fly. Any suggestions?

  43. Mike C.

    I recently switched to the updated version of the exe in order to get around the multiple triggering bug and because of that I am not getting sent the email notifications anymore. I confirmed that it does work with the old exe.

    It is trying to use a hardcoded mailserver called “mailserver”. If we add this to the hosts file on the system, we get an e-mail from “release.manasger@yourcompany.com”.

    Where are these variables set in the new .exe so we can use our own mail server and e-mail address?

    Here is the output from the diagnostic mode:
    tfsdeployer Error: 0 : System.Net.Mail.SmtpException: Failure sending mail. —>
    System.Net.WebException: The remote name could not be resolved: ‘mailserver’
    at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object ow
    ner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket
    6, Int32 timeout)
    at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32
    timeout, GeneralAsyncDelegate asyncCallback)
    at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate
    asyncCallback)
    at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncD
    elegate asyncCallback, Int32 creationTimeout)
    at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
    at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
    at System.Net.Mail.SmtpClient.GetConnection()
    at System.Net.Mail.SmtpClient.Send(MailMessage message)
    — End of inner exception stack trace —
    at System.Net.Mail.SmtpClient.Send(MailMessage message)
    at TfsDeployer.Alert.EmailAlerter.Alert(Mapping mapping, BuildData build, IRu
    nner runner)

  44. Mike C.

    I recently switched to the updated version of the exe in order to get around the multiple triggering bug and because of that I am not getting sent the email notifications anymore. I confirmed that it does work with the old exe.

    It is trying to use a hardcoded mailserver called “mailserver”. If we add this to the hosts file on the system, we get an e-mail from “release.manasger@yourcompany.com”.

    Where are these variables set in the new .exe so we can use our own mail server and e-mail address?

    Here is the output from the diagnostic mode:
    tfsdeployer Error: 0 : System.Net.Mail.SmtpException: Failure sending mail. —>
    System.Net.WebException: The remote name could not be resolved: ‘mailserver’
    at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object ow
    ner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket
    6, Int32 timeout)
    at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32
    timeout, GeneralAsyncDelegate asyncCallback)
    at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate
    asyncCallback)
    at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncD
    elegate asyncCallback, Int32 creationTimeout)
    at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
    at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
    at System.Net.Mail.SmtpClient.GetConnection()
    at System.Net.Mail.SmtpClient.Send(MailMessage message)
    — End of inner exception stack trace —
    at System.Net.Mail.SmtpClient.Send(MailMessage message)
    at TfsDeployer.Alert.EmailAlerter.Alert(Mapping mapping, BuildData build, IRu
    nner runner)

  45. Karthikeyan.P

    I am getting a strange error,
    I have registered the service in VS2005
    I tried registering in both the servers (TFS server and Build server)
    But still I cant make it work.
    But I get email notications abt change of status.

    I checked the event subscription and found the service availabale, but also get the below error.
    Can Anyone throw some light on it

    http://:8899/BuildStatusChangeEvent/BuildStatusChangeEvent
    =============================================



    a:ActionNotSupported
    The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

  46. Dave

    I’m a newbie here, very promising tool and it seems everyone can set up and get it running fairly easy. However, I have been struggling on this for a whole day. Would anyone please kindly shed some light on me so I can get it work? I installed TFS Deployer on my local station running XP. Can start TFS Deployer service on my local and subscribe as listener to my TFS Server(Another server machine). Configured the DeploymentMapping.XML and scripts, checked into TFS under the folder just as instructed here on this web site, configured powershell on my local station and set the correct environment. Can run DOS batch file in powershell. But I am not getting email and script will not run when the build quality is changed. TFS and Build machine are the same one. I point BaseAddress to my local machine, “http://xx.xx.xxx.xxx:8899”. Also, in DeploymentMapping.xml, pointed to my local station name. Did I miss anything that cause the problem? Thanks in advance.

  47. Craig Lebowitz

    Nice tool!

    I got it up and running today and I’m impressed. This is a great demonstration of TFS being extended… it was also a great excuse to get into powershell

    One thing that would be useful is more diagnostic messages when they service fails to start. I didn’t see anything in the event log or the working dir

    Thanks everyone for the work on this and especially for open sourcing it

  48. David

    I am trying to get TFS Deployer running. I have got it to run but has not deployed my web site. Can you explain the BaseAddress setting? What is is used for? I understand it looks like a web address and port, but what should it point to? Many thx in advance.

  49. Steve

    I’d also like to know what the BaseAddress should be. It seems to append the event type to the BaseAddress string/url, should this be a running site? Should it do anything?

    Some clarification would be good here as it looks like this is where my TfsDeployer is falling over.

  50. Mitch Denny Post author

    Hi Craig,

    If you run TFSDeployer.exe with the -d switch it will run in console mode, it can be easier to spot unhandled exceptions in this configuration. usually it is some configuration glitch or some security glitch.

  51. ksbaboo

    Hi Denny,

    I am newbie to TFS. We are planning to do some automate Build and Deploy process. I would like to ask you few queries.

    1. Does TFS Supports Automate Build & Deploy Process? if so please guide me.

  52. seshu

    hi,
    i have Installed TFS Deployer ,configure it i.e Make Deployment Folder in Team Build and Put Xml and Script file in it(change it according to my requirements), and then make team build of project, after this i changed Quality from “unexamined” to “Test” but it did nothing………. as it is mentioned above that “Deployment scripts are associated with specific Team Build Types and are designed to be triggered when the build quality indicator transitions from one state to another.”,
    can any one explain its reason and what step should i follow to trigger the event so that it work.
    Thanx in advance..
    Seshu

  53. dt

    Does TFS deployer writes to any logfile?
    When I run the app with the -d switch I see an error that it cannot make any connection to the secified mailserver. (which is possible)

    When I run TfsDeployer as a service I cannot see the error (wich still should occur) anywhere.
    It’s not written to the eventlog and I cannot find a logfile anywhere……

    Help would be appreciated….

  54. Mayank

    Need help in TFSDeployer
    Hi,

    I am new to using tfsdeployer, I have been able to do the required configuration for tfsdeployer with tfs 2008.

    TFSDeployer service has started without any issue.Now when i run tfsdeployer.exe -d mode then i get the below mentioned error.

    C:\Program Files\TFS Deployer>TFSDeployer.exe -d
    System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL ht
    tp://+:8899/BuildStatusChangeEvent/. Another application has already registered
    this URL with HTTP.SYS. —> System.Net.HttpListenerException: Failed to listen
    on prefix ‘http://+:8899/BuildStatusChangeEvent/’ because it conflicts with an e
    xisting registration on the machine.
    at System.Net.HttpListener.AddAll()
    at System.Net.HttpListener.Start()
    at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
    — End of inner exception stack trace —
    at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
    at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListene
    r channelListener)
    at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTranspor
    tManagersCallback selectTransportManagerCallback)
    at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan time
    out)
    at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open()
    at Readify.Useful.TeamFoundation.Common.Listener.TfsEventListener`1.OpenHost(
    )
    at Readify.Useful.TeamFoundation.Common.Listener.TfsEventListener`1.Start()
    at Readify.Useful.TeamFoundation.Common.Listener.TfsListener.Start()
    at TfsDeployer.Program.OnStart(String[] args)
    at TfsDeployer.Program.Main(String[] args)

    Because of this error i am assuming that TFSDeployer will not work properly. Can someone help in this?

  55. Devia

    Hi Mitch..

    This is divya here, i went through your website on TFS Deployer and i am experiencing this problem when i chage my build quality there is no effect at all, i check through each and every file and everything is perfect. Why is there no effect when i change my build quality

    I tried to run TFS Deployer in diagnostic mode to see if it is getting the notifications from TFS TFSDeployer.exe -d and what happens is, it prompts a message:HIt enter to stop the service.

    I really have no idea of what to do, i need your help

    I am looking forward in hearing from you real soon

    Divya

  56. Miguel

    I’m trying to setup Tfs Deployer on VS2008, but when I try to start the service I get the message: The TFS Service on Local Computer started and then stopped.

    Any ideia?

  57. RaiulBaztepo

    Hello!
    Very Interesting post! Thank you for such interesting resource!
    PS: Sorry for my bad english, I’v just started to learn this language😉
    See you!
    Your, Raiul Baztepo

  58. Todd Beaulieu

    Can anyone help me understand the branching in the source code for deployer? I need to know if I’m working with the latest. I took a guess and used the most recent “beta” branch from “releases”.

    I’m not entirely sure how this branching works.

  59. Mitch Denny Post author

    Hi Todd,

    Assuming you are looking at http://tfsdeployer.codeplex.com.

    If you want something stable just download one of the releases. If you want to try out what the team has been working on lately then go for $/tfsdeployer/Trunk, I wouldn’t recommend the branches. The code under $/tfsdeployer/Releases usually maps to the releases on the web site.

  60. Todd Beaulieu

    Thanks, Mitch!

    SO, I was using the most recent “release”, labeled “1.1_BETA3”.

    I haven’t been able to figure out when the releases were made to know when changesets made were incorporated.

    In fact, the reason I first grabbed the source was to fix the x86 flag issue on our 64-bit box, yet I see two separate comments that this has already been done.

    So …. I assume I’ll need to start over with my changes on the trunk, right?

    The biggest things I’ve changed so far, other than the flag, have been finishing the “keep forever” hook so the script can signal it w/o doing to work itself (seems to be only partially implemented) and I added a bunch of logging so the email has a ton of diagnostic information in it.

    The reason I’ve come back to the well is because I’m getting multiple notifications of build releases and saw mention that this was fixed (but no mention of how). Th eother day I got a number of events, exactly every 2 hours throughout the night. Strange!

  61. Mitch Denny

    Hi Todd,

    I know that Jason has been doing quite a few changes to TFS Deployer on the Trunk so its quite different from 1.1_BETA3. I\’m not quite sure how we would label that release.

    I\’d recommend contacting Jason to see where he was heading with those changes to see how what you are doing could plug-in. The 1.1_BETA3 release branch is really just for bug fixes to the BETA, but we wouldn\’t normally do that.

  62. matthew

    I haven’t read through this, but doesn’t MS Build 3 (TFS 2008) come with deployment features? What does TFS Deployer do that doesn’t come “out of the box” with TFS 2008 (or 2010)?

    My goal is the same: I want to promote the *physical* CI releases to QA, and a passed QA release to UAT. So we may have 8 CI releases and then it’s ready to QA; and we may have 3 QA releases before it goes to UA. I need each release to the “next” level to be comprehensive (has to play catch up – not all QA releases get promoted to UAT b/c a QA release can fail; UAT is only for ‘production-ready’ code).

    Thanks.

  63. Pingback: TFS Deployer and TFS 2008 « Code Assassin

  64. John

    Thanks for the great informative post, Mitch.

    I am able to install the TFSDeployer and the event notification is working that it delivers me a notification email whenever the build quality gets updated as I stated in the DeploymentMappings.xml.

    I wrote a test script which runs after each build quality updates but I can’t find a way to confirm it and note that there is a warning in the even viewer, showing DeploymentMappings.xml can’t be found.

    I checked into the source control but is there way that I need to specify the mapping xml location?

    thanks,

    John.

  65. Pingback: Digging into TFS Deployer and MSBuild « Fabio Stawinski

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s