About Me

Monday, February 10, 2014

Using Pre-Build, Post Build Events in C# Project

I have a Project which runs as a Windows service – which is a WCF service hosted under self-hosting. For each build I want to stop the service and copy build files to the output and restart the service. Normally this would be possible through Build Events as shown in below


But with the TFS CI build integrations I had to face a problem since TFS server does not have such service(s) installed. It gave me an error saying no such service exists and also stopped the CI build popping out an error. What I had to do was modify the pre build and post build command line as follows
Pre-Build Event



Post Build Event



This worked fine when no service found at the environment, finally this resolved my problem.

1 comment:

  1. Techtalkz: Using Pre-Build, Post Build Events In C Project >>>>> Download Now

    >>>>> Download Full

    Techtalkz: Using Pre-Build, Post Build Events In C Project >>>>> Download LINK

    >>>>> Download Now

    Techtalkz: Using Pre-Build, Post Build Events In C Project >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete