Skip to content

Commit e2184bc

Browse files
committed
updated Elasticsearch.Net.JsonNET to sign using the key and add a prebuild event to generate the key if its not there
1 parent f4de116 commit e2184bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Serialization/Elasticsearch.Net.JsonNET/Elasticsearch.Net.JsonNet.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
<NoWarn>1591,1572,1571,1573,1587,1570</NoWarn>
3333
<DocumentationFile>bin\Release\Elasticsearch.Net.JsonNet.XML</DocumentationFile>
3434
</PropertyGroup>
35+
<PropertyGroup>
36+
<SignAssembly>true</SignAssembly>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<AssemblyOriginatorKeyFile>..\..\..\build\keys\keypair.snk</AssemblyOriginatorKeyFile>
40+
</PropertyGroup>
3541
<ItemGroup>
3642
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
3743
<SpecificVersion>False</SpecificVersion>
@@ -56,9 +62,14 @@
5662
</ProjectReference>
5763
</ItemGroup>
5864
<ItemGroup>
65+
<None Include="keypair.snk" />
5966
<None Include="packages.config" />
6067
</ItemGroup>
6168
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
69+
<PropertyGroup>
70+
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
71+
</PreBuildEvent>
72+
</PropertyGroup>
6273
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6374
Other similar extension points exist, see Microsoft.Common.targets.
6475
<Target Name="BeforeBuild">

0 commit comments

Comments
 (0)