views:

20

answers:

1

Hi,

I'm trying to copy my Views folder for my MVC project in an MSBuild task, but it keeps on flatten everything, and I've tried loads of different things, but never manage to get it to work. Do you have any idea?

<ItemGroup>
    <ViewsFolder Exclude="*.cs;*.svn-base;" Include="../MyMVCProject.Web\Views\**\*.*"/>    
</ItemGroup>

<Copy SourceFiles="@(ViewsFolder)" DestinationFolder="c:\MyProject\Destination\MyMVCProject.Web\Views" />
+3  A: 

see here using %(RecursiveDir)

<Copy SourceFiles="@(ViewsFolder)" DestinationFolder="c:\MyProject\Destination\MyMVCProject.Web\Views\%(recursiveDir)" />
Preet Sangha
That's exactlly what I've been looking for. I don't know how I missed it. Thanks very much for such a clean, fast and very good response!
MrW
lol : google is your friend!
Preet Sangha
You have no idea I much time I've spent there... However, I'm not the best on coming up with what words to search for... so I probably spend way too much time looking for something I could have found in a minute.
MrW