Sachin Kainth
Sachin Kainth

Reputation: 46760

MSDeploy: Copy files to particular folder on destination machine

I am using TeamCity and MSDeploy to deploy a package to an IIS site on a deployment server from the build agent.

I want to deploy some fonts onto the deployment server as well. I know I can use two different approaches for this.

  1. Use FontReg.exe to install the fonts onto the deployment server.
  2. Copy the fonts to the C:\Windows\Fonts directory on the deployment server and update the registry on the deployment as well.

My issue is that I don't know how to do either of the above things using MSDeploy. It appears that all the commands for MSDeploy run on the source build server and not the destination deployment server. For example when I use runCommand expecting it to run on the destination server, it seems to run on the source server instead. Perhaps I'm using it wrong.

Is what I want to do even possible? Suppose I pick option 2. How can I even do the first part of it: copying the fonts to the fonts directory on the destination server? As part of the site deployment the font files are actually on the remote machine but not in the fonts directory.

Upvotes: 0

Views: 1733

Answers (1)

Stephen Connolly
Stephen Connolly

Reputation: 1639

Use the Postsync option to execute commands after the files have been transferred to the remote machine Execute script after deployment - MSDeploy

Upvotes: 1

Related Questions