I am rewriting NAnt scripts to make them cleaner and simpler, as well as more general purpose.
One of the steps in our build process is to pack certain files into a zip file. Before we created fileset
with a lot of file types included, trying to catch everything that might be in the project. This sometimes caused problems when we wanted to include a non-standard file type in the project.
I was hoping I could find a way to create fileset
file-based (as well as subsets of the files) listed in the Visual Studio project file (.csproj). Then I could use this set of files in zip
. I did not find anything that does this automatically (although now the obsolete SLiNgshoT
task in NAntContrib looked a bit promising).
I started out on the road, trying to do it manually, but got stuck. I have a goal that gets the project from the solution (using regex
), then tries to get every content file in the project using xmlpeek
(with XPath request /n:Project/n:ItemGroup/n:Content/@Include
). The problem here is that xmlpeek
each value does not return, just the first. And even if he really returned every value, I’m not sure how this can be done from fileset
here.
Is there a way to save this track of thinking? Can I accomplish what I want with a custom NAnt task (I would prefer each project not to depend on a custom task)? Is there a built-in way to do this that I cannot find?
Please feel free to ask questions in the comments if something about my purpose or method is not clear.
Thanks!
: , , . .xml , .xml , , . , ( ), , . , , , . , ...