I'm working with a php website in Visual Studio 2010. Everything was going well until I tried to publish. None of the php files are included in the published version of the website. How do I fix this?
I read in this thread (Visual Studio 2010 Web Publish missing a file) that you can change the BuildAction
property on a per-file basis. Great, but how do I do this automagically for eleventy-two and some-odd files spread throughout a massive folder hierarchy? Could I change the default BuildAction
for, say, every file that ends in *.php
? I'm even willing to do this on the command-line, because, at least then, I can iterate through a list of the files and change it for each of them.
Edit: I realised something: The BuildAction
Property is stored in the <Project_Name>.vbproj
file, in this form:
<ItemGroup>
<Content Include="aboutus.php" />
<None Include="login.php" />
This is what it looks like just after I changed the BuildAction
of aboutus.php (via VS), but not of login.php. Judicious use of Find-and-Replace would work, but would be tedious. That's my temporary solution.