Rick Rat
Rick Rat

Reputation: 1732

Running command after publishing files

I am trying to run a command after publishing.

<Target Name="AfterPublish" AfterTargets="MSDeployPublish">
  <Exec Command="echo @@@@@ AfterPublish @@@@@ " />
</Target>

But as you see below, it copies the published output after calling this target.

------ Publish started: Project: ClickOnceTest, Configuration: Debug Any CPU ------
2>  @@@@@ AfterPublish @@@@@ 
Connecting to 'C:\temp\Debug\'...
Publishing files...
Publish success.

How do I get it to happen after the "Publishing files" step is finished?

Upvotes: 8

Views: 3442

Answers (1)

granadaCoder
granadaCoder

Reputation: 27904

Do you have any lingering "DependsOnTargets"?

http://freetodev.wordpress.com/2009/06/24/msbuild-4-0-beforetargets-and-aftertargets/

There are some "rules of execution".......when that happens.

I don't think you've given enough of your msbuild contents.

Upvotes: 1

Related Questions