Ryan Norbauer
Ryan Norbauer

Reputation: 1708

How do I run a script in VS before publishing web site to Azure?

I am currently building an ASP.Net Web Pages site in Visual Studio. I am using the "Publish" context menu functionality to push this up to an Azure Web Site.

However, I want to copy all my assets (from a particular directory in the Web Site project) up to a blob storage bucket before publishing the site. Is there a way to integrate running a script in the publishing process that would perform this task before pushing the site up to Azure?

Upvotes: 1

Views: 506

Answers (1)

schitombite
schitombite

Reputation: 36

Right click on the Azure Project node in Solution Explorer, Properties, Build Events, Pre-build event command line. You can put a command there that executes your script. The Publish will trigger the build that will trigger your pre-build script.

Upvotes: 2

Related Questions