Set SharePoint deployment commands
You can customize the deployment process by setting pre-deployment and post-deployment commands. These commands run before and after other deployment actions when you debug SharePoint solutions from Visual Studio.
To add a pre-deployment command
On the menu bar, choose Project > <ProjectName> Properties.
Choose the SharePoint tab.
In the Pre-deployment Command Line text box, enter MS-DOS or MSBuild commands to customize this step.
For example, to list the directory contents before deployment is completed, enter dir.
To add a post-deployment command
On the menu bar, choose Project > <ProjectName> Properties.
Choose the SharePoint tab.
In the Post-deployment Command Line text box, enter MS-DOS or MSBuild commands to customize this step.
For example, to list the directory contents after deployment is completed, enter dir. To use a MSBuild variable to copy the assembly from the build directory, enter copy $(TargetPath) c:\DeploymentDirectory.
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for