1
|
<Project>
|
2
|
<Target Name="AddInternalsVisibleTo" BeforeTargets="BeforeCompile">
|
3
|
<!-- Add default suffix if there is no InternalsVisibleTo or InternalsVisibleToSuffix defined -->
|
4
|
<ItemGroup Condition="@(InternalsVisibleToSuffix->Count()) == 0 AND @(InternalsVisibleTo->Count()) == 0">
|
5
|
<InternalsVisibleToSuffix Include="Tests" />
|
6
|
<InternalsVisibleToSuffix Include="UnitTests" />
|
7
|
<InternalsVisibleToSuffix Include="FunctionalTests" />
|
8
|
</ItemGroup>
|
9
|
|
10
|
<!-- Handle InternalsVisibleTo -->
|
11
|
<ItemGroup Condition="'@(InternalsVisibleTo->Count())' > 0">
|
12
|
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
13
|
<_Parameter1>%(InternalsVisibleTo.Identity)</_Parameter1>
|
14
|
</AssemblyAttribute>
|
15
|
</ItemGroup>
|
16
|
|
17
|
<!-- Handle InternalsVisibleToSuffix -->
|
18
|
<ItemGroup Condition="@(InternalsVisibleToSuffix->Count()) > 0">
|
19
|
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
20
|
<_Parameter1>$(AssemblyName)%(InternalsVisibleToSuffix.Identity)</_Parameter1>
|
21
|
</AssemblyAttribute>
|
22
|
</ItemGroup>
|
23
|
</Target>
|
24
|
</Project>
|