Visual Studio creates (empty) folder in / bin for "Content" build action on publish

I have a web application project in Visual Studio 2005 that I publish using "Project" → "Publish".

The application uses some (text) files that are in the top-level folder; let's call it textfiles

for example.

What I would like to achieve is that Visual Studio creates a top level folder named textfiles

on the landing page when publishing. The folder should contain the text files it contains on my local machine when publishing.

I got pretty close by setting "Build Action" to "Content" and "Copy to Output Directory" to "Do not copy" in the text files settings. This allows VS to create a named top-level folder textfiles

that contains the files I want. But it also creates an empty textfiles

-panel in / bin which I don't need / want.

Is there a way for VS to pop the empty folder? Preferably without a post build event (is this what you call it?). I felt that "Don't Copy" should do the trick ...

By the way, the other settings I use for publishing are "Delete all existing files" and "Only files are needed"; Enable App_Code is disabled.

+2


a source to share


1 answer


Open the proj file in notepad and find the "Copy to Output Directory" node. Delete it and try it.



0


a source







All Articles