Visual Studio Web Deploy not publishing all Files

Select the view that is not publishing to server,
go to properties (click F4) of the view
under properties
check the properties set for it:

  1. Build Action : this should be Content
  2. Copy to Output Directory: this should be like the other file are configured (I believe it should be Do not copy)

Then publish it.


I had a similar problem. I eventually fixed it by tweaking my publish profile in the file Properties\Publish Profiles\ReleaseProfile.pubxml.user.

There was a line in that file that referenced the file that wouldn't publish:

<File Include="Online.master">
    <publishTime>01/01/0001 00:00:00</publishTime>
</File>

I changed the date to one that was still in the past but wasn't ancient:

<File Include="Online.master">
    <publishTime>01/01/2020 00:00:00</publishTime>
</File>

and the file published successfully on my next attempt.

Tags:

Iis 7