有没有办法从发布时覆盖较新的文件保存在程序App_Data文件? [英] Is there a way to keep files in App_Data from overwriting newer files when publishing?

查看:242
本文介绍了有没有办法从发布时覆盖较新的文件保存在程序App_Data文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我结合使用XML文件中的App_Data与Intranet应用程序的主页上转发让我当他们登录有关应用程序状态,维修等来测试功能显示消息给用户,这将是很好有正在开发App_Data文件夹文件,但如果我这样做,它在生产服务器上复制过来的文件,当我发布应用程序。反正我可以从短期的去一个Web部署项目发生prevent这一点(这将解决我的问题)?

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)?

推荐答案

在Visual Studio 2005中,我看到一个标有一个复选框,包括来自App_Data文件夹中的文件,默认为选中。您是否尝试过与该复选框选中发布?

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?

编辑:看到因为这复选框怎么不适用于你的项目,我会考虑使用的 VS2005 Web部署附加的视觉工作室。我没有用它自己,而是在功能之间的调试和发布模式看起来很有希望定制发布。

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.

这篇关于有没有办法从发布时覆盖较新的文件保存在程序App_Data文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆