Skip to content

Commit 06ddfd3

Browse files
authored
Reintroduce AssemblyInfos target (#6297)
1 parent 3e73bf3 commit 06ddfd3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Directory.Build.targets

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,23 @@
1515
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)'=='netstandard2.0'">true</CopyLocalLockFileAssemblies>
1616
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1717
</PropertyGroup>
18+
19+
<Target Name="AssemblyInfos"
20+
BeforeTargets="CoreGenerateAssemblyInfo"
21+
Inputs="@InternalsVisibleTo" Outputs="%(InternalsVisibleTo.Identity)"
22+
Condition="$(IsPackable) == True">
23+
<PropertyGroup>
24+
<ExposedAssembly>%(InternalsVisibleTo.Identity)</ExposedAssembly>
25+
<VersionNamespaced>$(ExposedAssembly.Replace("Nest", "Nest$(MajorVersion)").Replace("Elasticsearch.Net","Elasticsearch.Net$(MajorVersion)"))</VersionNamespaced>
26+
</PropertyGroup>
27+
<ItemGroup>
28+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
29+
<_Parameter1>%(InternalsVisibleTo.Identity), PublicKey=$(ExposedPublicKey)</_Parameter1>
30+
</AssemblyAttribute>
31+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
32+
<_Parameter1>$(VersionNamespaced), PublicKey=$(ExposedPublicKey)</_Parameter1>
33+
</AssemblyAttribute>
34+
</ItemGroup>
35+
</Target>
1836

1937
</Project>

0 commit comments

Comments
 (0)