Include Files using Wildcard into a folder in Visual Studio
        Posted  
        
            by quip
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by quip
        
        
        
        Published on 2009-09-01T20:04:32Z
        Indexed on 
            2010/05/06
            2:38 UTC
        
        
        Read the original article
        Hit count: 372
        
msbuild
|visual-studio
I am using
<ItemGroup>
  <EmbeddedResource Include="..\..\resources\hbm\*.hbm.xml" />
</ItemGroup>
to include a bunch of xml files into my C# project. Works fine.
But, I don't want them in the "root level" of my project, I would rather see them in a subfolder in my project.
For example, this file is included into a Mapping folder in Visual Studio:
<ItemGroup>
  <EmbeddedResource Include="Mapping\User.hbm.xml" />
</ItemGroup>
That's what I want for my *.hbm.xml files.
I can't figure out how to do it and still keep my wildcard *.hbm.xml part and also keep the actual files in a different directory.
I've looked at MSDN's doc on MSBUILD and items, but no luck.
© Stack Overflow or respective owner