Skip to content

Instantly share code, notes, and snippets.

@jbogard
Created February 19, 2014 23:05
Show Gist options
  • Save jbogard/9103524 to your computer and use it in GitHub Desktop.
Save jbogard/9103524 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Build sequence modification -->
<Target Name="CopyAutoMapperAssembly"
AfterTargets="ResolveAssemblyReferences">
<CreateItem Include="%(ReferencePath.FullPath)"
Condition="$([System.String]::new('%(ReferencePath.Filename)').StartsWith('AutoMapper.'))">
<Output TaskParameter="Include"
ItemName="_AutoMapperReference"/>
</CreateItem>
<Message Importance="low" Text="AutoMapper Platform Extension Assembly: %(_AutoMapperReference.FullPath)"/>
<ItemGroup>
<Content Include="%(_AutoMapperReference.FullPath)" Condition="'%(_AutoMapperReference.FullPath)' != ''">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment