asp.netdeploymentapplication-data

Is there a way to keep files in App_Data from overwriting newer files when publishing?


I use an XML file in App_Data in conjunction with a Repeater on the main page of an intranet application allow me to display messages to users when they logon about application status, maintenance, etc. To test the functionality, it would be nice to have the file in the App_Data folder under development, but if I do this it copies it over the file on the production server when I publish the application. Is there anyway I can prevent this from happening short of going to a Web Deployment project (and will that solve my problem)?


Solution

  • In Visual Studio 2005, I see a checkbox labeled "Include files from the App_Data folder", which defaults to checked. Have you tried publishing with that checkbox unchecked?

    EDIT: Seeing as how that checkbox isn't available for your project, I would look into using the VS2005 Web Deployment add-on for visual studio. I haven't used it myself but the features to customize publishing between debug and release mode looks promising.