Advertisement

02.01.2008 at 07:50AM PST, ID: 23129836
[x]
Attachment Details

How do I recursively exclude folders using MSBuild?

Asked by velir in .Net Editors & IDEs, .NET, Microsoft Development

Tags: MSBuild

I am new to MSBuild and am having some trouble figuring out how to recursively exclude folders of a certain name.  

I know how to just exclude a certain directory like this

<ExcludeFromBuild Include="$(SourceWebPhysicalPath)\someFolder" />

it is also no problem to recursively exclude certain file types like so

<ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.csproj" />

The problem I am running into is when dealing with subversion directories.  In a bunch of the folders on the development site there are .svn folders, which are needed for using subversion.  What I am trying to do is when I build the site, exclude all folders in the site that are named .svn .  I am having some issues getting this to work, so I am hoping someone can point me in the right direction.  I tried

<ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\.svn" />

but that did not do the trick.

GabeStart Free Trial
[+][-]02.03.2008 at 02:55PM PST, ID: 20810808

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 07:14AM PST, ID: 20823513

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2008 at 11:25AM PST, ID: 20960499

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, .NET, Microsoft Development
Tags: MSBuild
Sign Up Now!
Solution Provided By: velir
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628