Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - Publish to multiple locations?

Is there a way to automatically publish a website to multiple locations at once?

Our website is load balanced across multiple servers, so when I want to publish I have to do it to each server individually.

Thx, Trev

like image 251
Trev Avatar asked Dec 17 '08 16:12

Trev


People also ask

How do I change the publish path in Visual Studio?

To specify a publishing location With a project selected in Solution Explorer, on the Project menu, click Properties. Click the Publish tab. In ClickOnce for . NET Core 3.1 and .

How do I publish a Visual Studio project to a server?

You can publish your web app using FTP or FTPS. Provide the necessary connection details and choose Finish. Next, you see the summary page for the new publish profile that you just created using the Publish wizard. Click Publish and Visual Studio deploys your web app to the provided FTP or FTPS Server.

What does publish in Visual Studio do?

Publishing creates the set of files that are needed to run your application. To deploy the files, copy them to the target machine.


2 Answers

Perhaps with some build scripts, such as MSBuild? Or perhaps you could create a script (PowerShell, VBScript, whatever), which copies all contents of a directory, and invoke it in the post build event (configurable in Visual Studio), so that once your solution (or the last project, actually) is built the script will run and copy the output files to wherever you need them.

like image 127
Pawel Krakowiak Avatar answered Sep 26 '22 19:09

Pawel Krakowiak


You could

  1. Publish the content to a UNC and have all of the web servers work off of that UNC
  2. Push the content from your staging/QA server to production using a tool like MSDeploy
  3. Use FRS to replicate the files from a "master" webserver to everyone else.
like image 22
jwmiller5 Avatar answered Sep 22 '22 19:09

jwmiller5