I am attempting to create a deployment package for my website via Visual Studio 2010. The website in question has a binding that I point to 127.0.0.1 in my hosts file. My web application project settings point to that website and all works fine. When I try to create a package, however, the settings from the wrong site are used. How can I tell the deployment package to use the correct settings and what mechanism controls this?
Update: It appears that the MapUriToIisWebServer task in Microsoft.Web.Publishing.targets is coming up with the wrong IIS website. Got that from the output of using msbuild via the command line:
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 /