Publish/Deploy does not deploy empty folders - by Joseph Iacobelli

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 546356 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 3/31/2010 9:07:36 AM
Access Restriction Public


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 and we can discuss more...
Vishal R. Joshi |
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