1

I have very strange problem and I don't even know why it occurs. Maybe I'm doing something wrong.

So i have created new website in VB2012. Then i've created new folder and uploaded everything on my host. But this folder is missing on the server. Why is that and how to fix it? Do i need to create desired folders on my host manually?

Folder named "photos" added in my website project

New directory

Folder is missing on the server when I upload that project

File is missing

rootpanthera
  • 2,731
  • 10
  • 33
  • 65

2 Answers2

2

From my experience VS won't publish an empty folder. As a workaround we always put a dummy file in the folder to ensure that it gets copied over. Something like "placeholder.txt"

Smeegs
  • 9,151
  • 5
  • 42
  • 78
2

Empty directories are not published when using Visual Studio.

The top answer to this question regarding a similar issue suggests a workaround:

You need to create a placeholder.txt file in each empty directory if you want the precompilation tool to generate these empty folders. Failing that you can create a command line app that will create the folders in your post build events (but only if you are using web application project not web site project).

Community
  • 1
  • 1
Lewis
  • 789
  • 8
  • 20