我已经成功地将多个站点部署到同一台服务器上,效果非常好。但是,我尝试了多种方法,但是文件没有被部署。
首先,我尝试以与我的网站相同的方式部署控制台应用程序,即:
<MSBuild
Projects="$(SolutionRoot)\MySolution.sln"
Properties="AllowUntrustedCertificate=True;AuthType=Basic;
Configuration=DEBUG;CreatePackageOnPublish=True;
DeployIisAppPath=Default Website/dummy.dev.myapp;
DeployOnBuild=True;DeployTarget=MsDeployPublish;
MSDeployPublishMethod=WMSvc;
MsDeployServiceUrl=https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd;
UserName=userid;Password=password;UseMsdeployExe=True"
/>
没有成功。
编辑:没有返回错误消息。一切似乎都进行得很顺利。
然后,我也尝试按以下方式部署控制台应用程序:
<Exec Command=""C:\Program Files\IIS\Microsoft Web Deploy V2\MSDeploy.exe"
-verb:sync
-source:contentpath="$(OutDir)\MyApp.Precompiled"
-dest:contentpath="D:\dev.myapp",computername=xxx.xxx.xxx.xxx,username=userid,password=password"
ContinueOnError="false" />
我实际上也尝试过使用计算机名作为https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd
。
编辑:以下是我得到的结果。 执行:文件或文件夹未找到 执行:类型为“contentPath”的对象和路径“E:\ Builds \ 1 ... \ dev.myapp”无法创建。 执行:路径“\?\ E:\ Builds \ 1 ... \ dev.myapp”无效。 执行:1。 E:\ Builds \ 1 ... \ BuildType \ Targets \ Deploy.targets(142):“C:\ Program Files \ IIS \ Microsoft Web Deploy V2 \ MSDeploy.exe”-verb:sync -source:contentpath =“E:\ Builds \ 1 ... \ dev.myapp”-dest:contentpath =“D:\ dev.myapp”,computername = https://xxx.xxx.xxx.xxx:8172 / MsDeploy.axd,username = userid,password = password”退出代码-1。 我意识到我没有读完所有错误,我真的需要UNC路径吗?
有人知道如何做吗?