For FTP publish profile the `AfterPublish` target runs prior to FTP connection
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
I have setup a publish profile (.pubxml) with FTP/FTPS Server (WebPublishMethod: FTP) and am looking to [Run a target before or after publishing](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles#run-a-target-before-or-after-publishing).
The `BeforePublish` target works as intended, but the `AfterPublish` target runs prior to the FTP connection which is problematic since I need to restart a remote service after files are transferred.
Would it be possible to add another target like `FTPPublish` similar to `FileSystemPublish` used in profile Folder (WebPublishMethod: FileSystem) that invokes after files are copied? The preferable solution would be to have the FTP transfer occur prior to `AfterPublish` target runs.
Using the following to show which targets are run, the final target is `DotNetPublish` but that still runs prior to FTP connection.
> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity -> Diagnostic
VS 17.12.0
.NET SDK 9.0.100
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.