从_bin_deployableAssemblies目录排除.svn文件? [英] Exclude .svn from _bin_deployableAssemblies directory?
问题描述
在VS 2010中的ASP.NET MVC 3项目有添加一个部署相关性文件夹(_bin_deployableAssemblies)(点击Web项目右键)的选项,这个目录中的文件将被复制到/ bin目录
In VS 2010 for ASP.NET MVC 3 project there is an option to add a "Deployable Dependencies" folder (_bin_deployableAssemblies) (click right button on web project), files contained in this directory will be copied to the /bin directory.
如果你使用Subversion,这个任务也将尝试复制的.svn文件夹及其内容,这将导致一个错误由于与/ bin中的自己的.svn文件夹中的冲突。
If you are using Subversion, this task will also try to copy .svn folder and its content, which will result in an error due to a collision with /bin 's own .svn folder.
问:如何排除.svn文件被复制到/ bin文件夹
Question: how do you exclude .svn folder from being copied to /bin?
推荐答案
以下,似乎这样的伎俩:
Following seems to do the trick:
- 备份和打开文件
Microsoft.WebApplication.targets
(在发现我的电脑C对:\\ Program Files文件\\的MSBuild \\微软\\ VisualStudio的\\ V10 .0 \\ web应用
) - 找到指定的目标
_CopyBinDeployableAssemblies
- 在任务查找行:
<CreateItem
Include="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\*.*"
Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')">
和增加排除
属性如下:
<CreateItem
Include="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\*.*"
Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')"
Exclude="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\.svn\**\*">
这篇关于从_bin_deployableAssemblies目录排除.svn文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!