-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
31 lines (28 loc) · 1018 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
23
24
25
26
27
28
29
30
31
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Choose>
<When Condition="'$(SolutionDir)' != '' AND '$(SolutionDir)' != '*Undefined*'">
<PropertyGroup>
<NormalizedRoot>$(SolutionDir)</NormalizedRoot>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<NormalizedRoot>$(ProjectDir)..\</NormalizedRoot>
</PropertyGroup>
</Otherwise>
</Choose>
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
<PropertyGroup>
<DocsGenArgs>
$(MSBuildProjectName)
$(PackageProjectUrl)
$(NormalizedRoot)
</DocsGenArgs>
</PropertyGroup>
<Target Name="BuildDocs" AfterTargets="AfterBuild"
Condition="!($(MSBuildProjectName.EndsWith('.Test')) OR $(MSBuildProjectName)=='DocsGenerator')">
<Exec Command="echo $(NormalizedRoot)" />
<Exec
Command="dotnet $([System.IO.Path]::Combine($(NormalizedRoot),$(DocsGenProj),$(DocsGenName))).dll -- $(DocsGenArgs.Replace('%0A',' ').Replace(' ',''))" />
</Target>
</Project>