-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
48 lines (42 loc) · 1.97 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<Project>
<!-- Conventions for build extensions -->
<Import Project="./apps/Directory.Packages.props" Condition="'$(Ing_ProjectType)'=='BuildExtension'"/>
<!-- Standard packages in all projects -->
<ItemGroup Label="Standard" Condition="'$(Ing_ProjectType)'!='BuildExtension'">
<PackageReference Include="MinVer" />
<PackageReference Include="Ben.Demystifier" />
</ItemGroup>
<!-- Standard testing packages -->
<ItemGroup Label="Testing" Condition="'$(Ing_ProjectType)'=='Test'">
<PackageReference Include="coverlet.collector" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
</ItemGroup>
<!-- Xunit testing packages-->
<ItemGroup Label="Testing" Condition="'$(Ing_ProjectType)'=='Test' And '$(Ing_TestFramework)'=='xunit'">
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="Verify.XUnit" />
</ItemGroup>
<!-- InternalsVisibleTo -->
<!--
This is made possible by the excellent work of Gérald Barré
https://www.meziantou.net/declaring-internalsvisibleto-in-the-csproj.htm
-->
<Target Name="AddInternalsVisibleTo" BeforeTargets="BeforeCompile">
<!-- Default suffix if nothing has been specified explicitly -->
<ItemGroup Condition="@(InternalsVisibleToSuffix->Count())==0 AND @(InternalsVisibleTo->Count())==0 AND '$(Ing_ProjectType)'!='Test'">
<InternalsVisibleToSuffix Include=".Tests" />
</ItemGroup>
<ItemGroup Condition="@(InternalsVisibleTo->Count()) > 0">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>%(InternalsVisibleTo.Identity)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup Condition="@(InternalsVisibleToSuffix->Count()) > 0">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(AssemblyName)%(InternalsVisibleToSuffix.Identity)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>