Browse Source

added strong signing to tests to run in release mode

vpenades 1 year ago
parent
commit
7e6fd1b6f2
3 changed files with 25 additions and 4 deletions
  1. 5 3
      src/Directory.Build.props
  2. 12 0
      src/Shared/SharpGLTF.PublicKey.props
  3. 8 1
      tests/Directory.Build.props

+ 5 - 3
src/Directory.Build.props

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project>
 
+  <Import Project="$(MsBuildThisFileDirectory)Shared\SharpGLTF.PublicKey.props"/>
+
   <!-- Legal =================================================================================== -->
 
   <PropertyGroup>
@@ -29,9 +31,9 @@
   <!-- Condition=" '$(Configuration)' == 'Debug' " -->
   
   <ItemGroup>
-    <InternalsVisibleTo Include="SharpGLTF.Core.Tests"/>
-    <InternalsVisibleTo Include="SharpGLTF.Toolkit.Tests"/>
-    <InternalsVisibleTo Include="SharpGLTF.Ext.3DTiles.Tests"/>
+    <InternalsVisibleTo Include="SharpGLTF.Core.Tests" Key="$(StrongName_PublicKey)"/>
+    <InternalsVisibleTo Include="SharpGLTF.Toolkit.Tests" Key="$(StrongName_PublicKey)"/>
+    <InternalsVisibleTo Include="SharpGLTF.Ext.3DTiles.Tests" Key="$(StrongName_PublicKey)"/>
   </ItemGroup>
 
   <PropertyGroup>

+ 12 - 0
src/Shared/SharpGLTF.PublicKey.props

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+
+  <PropertyGroup>
+
+    <StrongName_Token>6f8b67557d279fe6</StrongName_Token>
+
+    <StrongName_PublicKey>0024000004800000940000000602000000240000525341310004000001000100318e6698f4f41b26736d5881759c6afde44d17c06b63d2e383c915ca1fed6ec1b6eb2e1c38013feb2320224ace549b7701e22e6e0f7770e0d72b5c199f9e969bf2c2668c0ebeb035e539fb534d9ef24053aa9997d2d72534a6c1da8ab58e353ed6eb62ad9eb1f4a044893d7a50a226e4701d4e472a7dc1918caee6794d9c4cae</StrongName_PublicKey>
+
+  </PropertyGroup>
+
+</Project>

+ 8 - 1
tests/Directory.Build.props

@@ -14,7 +14,14 @@
   <PropertyGroup>
     <LangVersion>8.0</LangVersion>
     <IsPackable>false</IsPackable>
-  </PropertyGroup>  
+  </PropertyGroup>
+
+  <!-- strong name signing -->
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <DelaySign>false</DelaySign>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\src\Shared\SharpGLTF.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
   
   <!-- Testing & Analysers =================================================================================== -->