views:

115

answers:

1

I have a problem in a project wherein my App_Resources folder has the following structure:

  • App_Resources
    • CTemp
    • Images

The problem is, while the Images folder has content files, CTemp does not. The result is that the folder is not created during installation, after which an error occurs because a lot of different parts of the application attempts to create files in that folder.

I need a way for the ASP.NET Website Deployment project to force-create the empty CTemp folder upon installation, so that files could immediately be written into it.

I understand that an easy hack for this would be to create a dummy content file into that folder (something like a benign readme.txt), or that I could programatically create the file on the first attempt to access it. But I'm seeking a solution that more elegantly solves the problem.

+1  A: 

Scott Guthrie has a very thourough article about web deployment projects that details exactly how to create a folder in the pre and post build stages

Stephen M. Redd