'Visual Studio Web Deploy not publishing all Files
When I publish my ASP.net MVC 3.0 Application to IIS 7 using Visual Studio Web Deploy settings one Partial View File is not updated.
Is it possible to debug why it failed for one particular file?
Solution 1:[1]
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:
- Build Action : this should be Content
- Copy to Output Directory: this should be like the other file are configured (I believe it should be Do not copy)
Then publish it.
Solution 2:[2]
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.
Solution 3:[3]
for me there was this line in .pubxml file, be sure to check the file contents as some settings are not visible from the configuration editor:
<ExcludeFoldersFromDeployment>Scripts/plugins;Content/icons;fonts</ExcludeFoldersFromDeployment>
Solution 4:[4]
For me right click on file and publish the file directly resolved this issue.
Solution 5:[5]
What worked for me in Visual Studio 2022 was to right-click the file/folder in question and publish that separately.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kara |
Solution 2 | samHumeniuk |
Solution 3 | mohas |
Solution 4 | Francis Pires |
Solution 5 | Kofi Ackaah |