-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.targets
24 lines (21 loc) · 1 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
<Project>
<!-- Source: https://www.meziantou.net/declaring-internalsvisibleto-in-the-csproj.htm -->
<Target Name="AddInternalsVisibleTo" BeforeTargets="BeforeCompile">
<ItemGroup Condition="@(InternalsVisibleToSuffix->Count()) == 0 AND @(InternalsVisibleTo->Count()) == 0">
<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>
<ItemGroup>
<InternalsVisibleTo Include="DynamicProxyGenAssembly2"/>
</ItemGroup>
</Target>
</Project>