-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathDirectory.Build.targets
22 lines (21 loc) · 1005 Bytes
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="OutDir">
<PropertyGroup>
<_AssetProcessorPath>$(BinDir)/$(Configuration)/AssetProcessor/netcoreapp2.0/AssetProcessor.dll</_AssetProcessorPath>
<_ProcessDir>$(BaseIntermediateOutputPath)/ProcessedAssets</_ProcessDir>
</PropertyGroup>
<Target Name="ProcessAssets" AfterTargets="AssignTargetPaths" Condition="'@(Asset)' != ''">
<PropertyGroup>
<_Command>dotnet $(_AssetProcessorPath)</_Command>
<_Command>$(_Command) $(_ProcessDir)</_Command>
<_Command>$(_Command) @(Asset->'%(Identity)', ' ')</_Command>
</PropertyGroup>
<Message Importance="high" Text="Executing: $(_Command)" />
<Exec Command="$(_Command)" />
<ItemGroup>
<_ProcessedAsset Include="$(_ProcessDir)/*.binary" />
<EmbeddedResource Include="@(_ProcessedAsset)">
<LogicalName>%(FileName)%(Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>
</Target>
</Project>