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?
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?
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:
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.
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>
What worked for me in Visual Studio 2022 was to right-click the file/folder in question and publish that separately.