我正在尝试通过Visual Studio 2010为我的网站创建部署包。有问题的网站有一个绑定,指向我的127.0.0.1主机文件。我的Web应用程序项目设置指向该网站,并且所有工作都正常。但是,当我尝试创建程序包时,会使用来自错误站点的设置。我怎样才能告诉部署包使用正确的设置以及使用哪种机制来控制它?如何指定IIS网站通过Visual Studio创建部署包
更新: 看来,Microsoft.Web.Publishing.targets的MapUriToIisWebServer任务上来了错误的IIS网站。明白了从通过命令行使用的MSBuild的输出:
Package:
Invoking Web Deploy to generate the package with the following settings:
$(LocalIisVersion) is 7
$(DestinationIisVersion) is 7
$(UseIis) is True
$(IisUrl) is http://mysite <-- correct url (use hosts file to point localhost)
$(IncludeIisSettings) is true
$(_DeploymentUseIis) is True
$(DestinationUseIis) is True
$(IisUrl_SiteID) is 2 <-- not the correct id
$(IisUrl_SiteFriendlyName) is notmysite.com <-- not the correct url
$(IisUrl_SiteRelativePath) is/
同一个问题的错误 - 你得到的这条底线? – 2013-03-07 13:31:46