2
votes

I'm trying to set up publishing/web deploy from Visual Studio 2015 Professional. For some reason, the publish doesn't build or use one of the projects in the solution. I have no idea why this is the case, as all projects are built locally when I build like normal.

This isn't happening because the project in question is already up-to-date. It isn't up-to-date, but it's not being built at all. The solution has 6 projects, and only 5 of them are being used (Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped).

I'm publishing from the startup project (right-click > Publish), but the project that isn't building is also a web project. I can Publish from the other one and it skips this one. I need both to be built/published.

This is a relatively new problem--publishing worked flawlessly for several months since I set it up, but it broke for an unknown reason earlier this week on all three of the servers/websites I build.

I don't know what information would be relevant to provide; I'll post anything asked for.

The .pubxml file:

<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. 
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>MSDeploy</WebPublishMethod>
    <ADUsesOwinOrOpenIdConnect>False</ADUsesOwinOrOpenIdConnect>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Mixed Platforms</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>False</LaunchSiteAfterPublish>
    <ExcludeApp_Data>True</ExcludeApp_Data>
    <MSDeployServiceURL>https://SERVER-NAME:8172/msdeploy.axd</MSDeployServiceURL>
    <DeployIisAppPath>SITE NAME</DeployIisAppPath>
    <RemoteSitePhysicalPath />
    <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
    <MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
    <EnableMSDeployBackup>True</EnableMSDeployBackup>
    <UserName>DOMAIN\USER</UserName>
    <_SavePWD>True</_SavePWD>
  </PropertyGroup>
</Project>
1

1 Answers

1
votes

You should ensure the project is setup to build for the selected configuration by right clicking on the solution and choosing ConfigurationManager:

enter image description here

enter image description here