Reputation: 2247
I'm trying to implement a MSBuild/deployment script for a customized QBO3 installation. I can build and publish to a remote Dev machine with the script that I currently have. However, my msbuild script is copying my bin folder to C:/inetpub/wwwroot
and I need them in a different directory (C:/inetpub/devqcc.quandis.net
).
Within my script, is there a way for me to specify a different destination folder for the files to get copied into?
Upvotes: 0
Views: 32
Reputation: 2247
The qbo3 MSBuild targets are designed to support both a file system deployment, and deployment via WebDeploy.
File System Deployments
To target a custom folder for file system deployments, specify a PublishFolder parameter:
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"PublishFolder=c:\inetpub\devqcc.quandis.net"
WebDeploy
To target a custom folder with WebDeploy (which sounds like your use case), specify a SiteName parameter:
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"SiteName=devqcc.quandis.net,Server=1.2.3.4,User=myUserName,Pwd=secret"
WebDeploy does not write to a file path; instead, it communicates with IIS and IIS determines where to place the files. This implies that your target box must already have a website configured to use the folder you are targeting.
For example, assume you have the following file structure on disk:
with cooresponding IIS websites:
To deploy to the c:\inetpub\devqcc.quandis.net
folder, tell WebDeploy to use the devqcc.quandis.net
website:
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"SiteName=devqcc.quandis.net,Server=1.2.3.4,User=myUserName,Pwd=secret"
To deploy to the c:\inetpub\uatqcc.quandis.net
folder, tell WebDeploy to use the uatqcc
website (note this example the site name != the folder name):
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"SiteName=uatqcc,Server=1.2.3.4,User=myUserName,Pwd=secret"
If you review the qbo3.Sample.proj
file, note that it provides defaults for both the PublishFolder
(for file system deployments) and SiteName
(for remote deployments via WebDeploy):
<PublishFolder Condition=" '$(PublishFolder)'==''">c:\inetpub\wwwroot</PublishFolder>
<SiteName Condition=" '$(SiteName)'==''">Default Web Site</SiteName>
Upvotes: 0