Home Dashboard Directory Help

Publish/Deploy does not deploy empty folders by Joseph Iacobelli


 as Won't Fix Help for as Won't Fix

Sign in
to vote
Type: Bug
ID: 546356
Opened: 3/31/2010 9:07:36 AM
Access Restriction: Public
User(s) can reproduce this bug


When deploying an application using the publish method, it does not deploy empty folders.

I have created a sub-directory inside of my App_Data folder for error logging. When deploying an application, I would like the directory to exist, but I do not want to actually deploy any error logs.

LogFiles is empty in my project (and should be empty upon initial deployment).

App_Data -> LogFiles

If I place an "dummy" file in the directory, it will be pushed properly.
Sign in to post a comment.
Posted by P. Schrama on 3/13/2012 at 4:47 AM
I second this, it's incredibly annoying that empty folders aren't actually published.
Posted by R. Tanenbaum on 2/21/2012 at 8:46 AM
I would like to vote to have this fixed. Seems to me that if the .csproj file has an entry that says
<Folder Include="App_Data\" />
then the folder should be included in the published package even if there are no files in it.

It seems like a poor solution to have to publish a dummy file just to get the folder created.

It should also be noted that in Visual Studio 2008, empty directories were deployed properly. So Visual Studio 2010 is breaking something that used to work.
Posted by Microsoft on 5/11/2010 at 7:49 PM
Hi Benjamin,
    Unfortunately this is a limitation of our current design that it is not possible to deploy empty folders... I wish we would be able to do that but is not really as straight forward as creating an empty directory :-( As of now the work around is to put a placeholder file...
     I know this is not the answer that you would like to hear but if the work around is really inconvinient then please reactivate the bug or feel free to send an email to Vishal.Joshi@Microsoft.com and we can discuss more...
Vishal R. Joshi | http://vishaljoshi.blogspot.com
Posted by Microsoft on 3/31/2010 at 9:06 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Sign in to post a workaround.
Posted by Joseph Iacobelli on 3/31/2010 at 9:08 AM
Create a placeholder file in the directory (placeholder.txt)