0

I have TFS2010 building a project solution, which is a copier. The build is succesful but does nothing, ie. doesn't copy.

How would I get the triggered build to copy the file?

Thanks

I have TFS 2010 and VS professonal 2010

EDIT

Update

Copier is the project being built. I added start copier.exe to the post build and it works when I build it manually, as in going to the build drop down menu and clicking build copier. But when I shedule a TFS build it doesn't start copier.

2
  • What do you mean by a project solution being a 'copier'? Can you please explain what you are trying to achieve? Is your problem that the build output doesn't get copied into the Drop location? Commented Jun 15, 2012 at 9:30
  • The output does get put in the Drop folder, thats not the problem. The code I wrote copies a folder and stores it on a server. When the build is done, it hasn't copied the folder. I'm wondering if there is a way for the build start the program, which would do the copy. Commented Jun 15, 2012 at 9:36

2 Answers 2

3

If you need the build process to invoke a program you need to edit the TFS Build Process Template.

There are a number of resources on the net for this, a good one is by Ewald Hofman. You can also find details in the TFS 2010 book by Wrox.

Once you are familiar with the Process Template you will need to add an InvokeProcess activity after the activities for the build has completed.

Also, consider adding a If activity and setting an argument so you can control which builds do this and which don't - for example, do your CI builds need this step?

Sign up to request clarification or add additional context in comments.

3 Comments

I had stumbled across Ewald's page but didn't give it a proper read so am doing that now. Your right I do want to invoke the program after the build, so hopefully the read will be a good one ;)
It is, I have heavily customised my build process templates at work based on Ewald's posts and that book.
I've tried following the steps, but got as far as 2/3 and I've been having problems with the .xaml as it won't let me save it.
1

I can't edit our build definition templates because they are company wide.

So I change the project file with extra post build steps.

Just add a step in the post buildstep of the project that contains the copier. You can call your output executable.

I do it for distributing my TFS builds to different release folders

Add this step:

"$(TargetPath)" to your project file.

13 Comments

How do you mean post build? The project is the copier.
Your project generates an executable that has to be executed right after the build, right? The post build step is executed right after the compilation of the project of the copier if you add the presented option there.
And where is the post build step? I can't find it in the edit build defintions. Do you mean to add the $(TargetPath) into the workspace tab?
With VB Projects there is a Build Events Tab if you open Project Settings
You don't add it to the build definition, you add it to the project itself... I didn't read your question entirely the first time!
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.