Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 825
Rick Rat Avatar asked Feb 27 '13 00:02

Rick Rat


1 Answers

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.

like image 179
granadaCoder Avatar answered Oct 22 '22 09:10

granadaCoder