我刚刚开始使用VS2008发布网站,而不是直接将代码存储在Web服务器上.我有一个文件夹,其中所有用户上传的文件均为"Static_Files",但是每次发布时,都必须将该文件夹复制回去,因为目录中的所有文件都被删除了.真烦人.发布网站时,有什么方法可以忽略此文件夹,而不将其删除? 非常感谢. 更新:我对VS08中的"Web应用程序项目"一无所知,我习惯于仅使用开放网站".我必须对此进行一些研究.
I just started publishing my sites with VS2008 rather than having the code directly on the web servers. I have a folder where all the user-uploaded files are, "Static_Files", but every time I publish it I have to copy that folder back over because all the files are deleted in the directory. It''s really annoying. Is there any way I can have this folder ignored and not deleted when I publish my site? Thanks much. Update: I didn''t know about the "web application project" in VS08, I''m used to using simply "Open Web Site". I have to do some research on that.
推荐答案我不认为您选择了在发布之前删除所有现有文件" "而不是用本地副本替换匹配的文件"? I don''t suppose you''ve selected ''Delete all existing files prior to publish'' rather than ''Replace matching files with local copies''?
forums.asp/p/1425906/3181059.aspx#3181059 [ ^ ] 简短的回答是否".该链接为我的问题提供了一些解决方法. forums.asp/p/1425906/3181059.aspx#3181059[^] Short answer is "No". This link has some workarounds for my question.
更多推荐
使用Visual Studio部署ASP.NET网站
发布评论