Repository navigation
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
53 lines (53 loc) · 1.73 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
53 lines (53 loc) · 1.73 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<Project>
<PropertyGroup>
<CsharpSourceDir>$(SolutionDir)src</CsharpSourceDir>
</PropertyGroup>
<ItemGroup>
<Compile Remove="build\**" />
<Content Remove="build\**" />
<EmbeddedResource Remove="build\**" />
<None Remove="build\**" />
</ItemGroup>
<ItemGroup>
<!-- IDisposable -->
<PackageReference Include="Fody">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>
runtime; build; native; contentfiles; analyzers; buildtransitive
</IncludeAssets>
</PackageReference>
<PackageReference Include="Janitor.Fody">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!-- Logging -->
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<!-- Source Link -->
<PackageReference
Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(Configuration)' == 'Release'"
Include="Microsoft.SourceLink.GitHub"
PrivateAssets="All"
/>
</ItemGroup>
<!-- csharpier settings -->
<Target Name="EnsureCSharpier">
<Exec
Command="csharpier --version"
IgnoreExitCode="true"
StandardErrorImportance="high"
StandardOutputImportance="low"
>
<Output PropertyName="CSharpierExists" TaskParameter="ExitCode" />
</Exec>
<Error
Condition="'$(CSharpierExists)' != '0'"
Text="csharpier is required but not found. Please install it via 'dotnet tool install -g csharpier' or visit https://www.nuget.org/packages/CSharpier/"
/>
</Target>
<Target BeforeTargets="Restore" DependsOnTargets="EnsureCSharpier" Name="FormatCSharpier">
<Exec
Command="csharpier format $(CsharpSourceDir)"
StandardErrorImportance="high"
StandardOutputImportance="low"
/>
</Target>
</Project>