Skip to content

Commit 907d8d4

Browse files
committed
Update EmptyFiles.targets
1 parent f3fb03b commit 907d8d4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

buildTransitive/EmptyFiles.targets

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22
<Project>
33
<PropertyGroup>
44
<EmptyFilesSourcePath>$(MSBuildThisFileDirectory)..\files</EmptyFilesSourcePath>
5-
<EmptyFilesTargetPath>$(OutDir)EmptyFiles</EmptyFilesTargetPath>
6-
<EmptyFilesMarker>$(EmptyFilesTargetPath)\.copied</EmptyFilesMarker>
75
</PropertyGroup>
86

97
<Target Name="CopyEmptyFilesIncremental"
10-
BeforeTargets="Build"
8+
AfterTargets="Build"
119
Condition="$(DesignTimeBuild) != true"
12-
Inputs="$(MSBuildThisFileFile)"
13-
Outputs="$(EmptyFilesMarker)">
10+
Inputs="$(MSBuildThisFileFullPath)"
11+
Outputs="$(IntermediateOutputPath)EmptyFiles.copied">
12+
13+
<PropertyGroup>
14+
<EmptyFilesTargetPath>$(TargetDir)EmptyFiles</EmptyFilesTargetPath>
15+
<EmptyFilesMarker>$(IntermediateOutputPath)EmptyFiles.copied</EmptyFilesMarker>
16+
</PropertyGroup>
1417

1518
<ItemGroup>
1619
<EmptyFilesToCopy Include="$(EmptyFilesSourcePath)\**\*.*" />
1720
</ItemGroup>
1821

22+
<Message Text="Copying EmptyFiles to $(EmptyFilesTargetPath)" Importance="high" />
23+
24+
<MakeDir Directories="$(EmptyFilesTargetPath)" />
25+
1926
<Copy SourceFiles="@(EmptyFilesToCopy)"
2027
DestinationFiles="@(EmptyFilesToCopy->'$(EmptyFilesTargetPath)\%(RecursiveDir)%(Filename)%(Extension)')"
2128
SkipUnchangedFiles="true" />

0 commit comments

Comments
 (0)