Syed Aslam Basha here. I am a tester on the Information Security Tools team.
To test the tools which we develop on the team, at times I need to build a website and publish it. I use a simple way of publishing websites from the command line that saves me a LOT of time so thought I would share it.
Launch notepad and copy paste the code below and save it as Publish.cmd file. Run visual studio command prompt (as administrator) and run the publish.cmd.
If there aren’t any errors the site will be published successfully as shown below
Publishing site D:\Source\website to c:\inetpub\wwwroot\mytestsite Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights reserved.
Site published successfully
Modify the above script parameters appropriately to publish your site successfully!