如何防止VS 2008在发布过程中发布.svn文件夹? [英] How to prevent VS 2008 from publishing .svn folders as part of publish process?

查看:114
本文介绍了如何防止VS 2008在发布过程中发布.svn文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2008中发布asp.net网站时,有一种方法可以强迫它忽略本地工作副本中的.svn文件夹,以便目标文件夹不会以.svn文件结尾部分输出.

When publishing an asp.net web site in Visual Studio 2008, is there a way that I can force it to ignore the .svn folders in my local working copy so that my target folder does not end up with .svn files as part of the output.

谢谢

Jason

推荐答案

Visual Studio在网站内部存在".svn"文件夹问题.因此,您应该应用Subversion ASP.NET hack,它使用"_svn"目录而不是".svn".

Visual Studio has a problem with ".svn" folders inside web sites. Therefore, you should apply the subversion ASP.NET hack, which uses "_svn" directories instead of ".svn".

使用TortoiseSVN时,这只是TSVN设置中的一个选项(请参见常规"页面).使用SVN命令行客户端时,必须设置环境变量(请参见此页面以获取详细信息).

When using TortoiseSVN, this is simply an option in the TSVN settings (see the General page). When using the SVN command line client, then you have to set an environment variable (see this page for details).

应用此变通办法/黑客后,发布网站操作将按预期进行(_svn文件夹将被忽略).

After applying this workaround/hack, the publish website operation will work as expected (the _svn folders are ignored).

更新:

Visual Studio 2003存在上述问题(分别是其使用的首页扩展名).较新版本的Visual Studio应该不会出现问题.

The problems mentioned above, existed with Visual Studio 2003 (resp. the front page extensions it used). Newer versions of Visual Studio should not have the problem.

所以关键似乎在于简单地在subversion文件夹(_svn或.svn)上设置隐藏标志.然后,在发布网站时将忽略文件夹. (我使用的是TortoiseSVN,我猜它会自动在subversion文件夹上设置隐藏标志.)

So the key seems to be to simply set the hidden flag on the subversion folders (_svn or .svn). Then the folders are ignored when publishing the website. (I'm using TortoiseSVN, and I guess it automatically sets the hidden flag on the subversion folders).

这篇关于如何防止VS 2008在发布过程中发布.svn文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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