Created
January 27, 2011 13:56
-
-
Save JasonCozens/798530 to your computer and use it in GitHub Desktop.
This MSBuild script shows how to filter Items into two separate item lists. This could be used for filtering files for different installers etc .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project | |
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" | |
ToolsVersion="4.0" | |
> | |
<ItemGroup> | |
<Binary Include="SrcDir/assembly01.txt" > | |
<Server>.</Server> | |
</Binary> | |
<Binary Include="SrcDir/assembly02.txt" > | |
<Server>.</Server> | |
<Desktop>.</Desktop> | |
</Binary> | |
<Binary Include="SrcDir/assembly03.txt" > | |
<Desktop>.</Desktop> | |
</Binary> | |
</ItemGroup> | |
<Target Name="Server" > | |
<Copy | |
DestinationFolder="Server" | |
SourceFiles="@(Binary)" | |
Condition="%(Binary.Server) != '' " | |
/> | |
</Target> | |
<Target Name="Desktop" > | |
<Copy | |
DestinationFolder="Desktop" | |
SourceFiles="@(Binary)" | |
Condition="%(Binary.Desktop) != '' " | |
/> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment