0

I am trying to execute a script that zips and copies the output directory after publishing my C# application in Visual Studio using the Folder Profile.

I believe this should be doable by binding to some AfterPublish Target, but this doesn't seem to work. I can't really find any good documentation on what targets there are or which I should use for this.
The most relevant question on here that I could find uses Visual Studio 2010 which is a bit outdated.

Arnaud VdP
  • 227
  • 1
  • 9

1 Answers1

0

Please see the following url, it may be relevant if you're trying to publish via the command line or within VS, as the two styles use different settings.

AfterPublish targets don't execute in final publish folder under Visual Studio 2017 #152

The core detail from this link is the follow post:

vijayrkn commented on 16 Mar 2017 VS uses the msbuild property 'PublishUrl' to determine the target location and cli uses PublishDir. If you open the pubxml for FileSystem publish , you will notice that the target location is specified in the PublishUrl property.

  • 1
    Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. – Greg the Incredulous Aug 28 '19 at 00:02