|
1 | | -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | | - |
3 | | - <!-- Use NuGet SNK by default for all projects except API.Test. --> |
| 1 | +<Project> |
4 | 2 | <PropertyGroup> |
5 | | - <StrongNameKey>$(NUGET_PFX_PATH)</StrongNameKey> |
6 | | - <DefaultStrongNameCert>67</DefaultStrongNameCert> |
| 3 | + <SignAssembly>true</SignAssembly> |
| 4 | + <SignWithTestKey Condition="'$(TestProject)' == 'true'">true</SignWithTestKey> |
7 | 5 | </PropertyGroup> |
8 | 6 |
|
9 | | - <!-- Use MSFT SNK for all NuGet.Core test and source projects and since we do not own MSFT SNK we can only delay sign the assemblies. --> |
10 | | - <PropertyGroup Condition = " $(MSBuildProjectFullPath.Contains('src\NuGet.Core')) == 'true' or $(MSBuildProjectFullPath.Contains('test/NuGet.Core')) == 'true' or |
11 | | - $(MSBuildProjectFullPath.Contains('src/NuGet.Core')) == 'true' or $(MSBuildProjectFullPath.Contains('test\NuGet.Core')) == 'true' or |
12 | | - $(MSBuildProjectFullPath.Contains('NuGet.CommandLine.csproj')) == 'true' or |
13 | | - $(MSBuildProjectFullPath.Contains('NuGet.Indexing.csproj')) == 'true' "> |
| 7 | + <PropertyGroup Condition="'$(TestProject)' != 'true' And '$(SignWithTestKey)' != 'true'"> |
| 8 | + <SignWithNuGetKey Condition="'$(SignWithMicrosoftKey)' != 'true' And '$(SignWithNuGetKey)' == ''">true</SignWithNuGetKey> |
| 9 | + <SignWithMicrosoftKey Condition="'$(SignWithNuGetKey)' != 'true' And '$(SignWithMicrosoftKey)' == ''">true</SignWithMicrosoftKey> |
| 10 | + </PropertyGroup> |
| 11 | + |
| 12 | + <!-- Use Test SNK by default for all test projects --> |
| 13 | + <PropertyGroup Condition="'$(SignWithTestKey)' == 'true'"> |
| 14 | + <AssemblyOriginatorKeyFile>$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'keys', 'Test.snk'))</AssemblyOriginatorKeyFile> |
| 15 | + </PropertyGroup> |
14 | 16 |
|
15 | | - <StrongNameKey>$(MS_PFX_PATH)</StrongNameKey> |
16 | | - <DefaultStrongNameCert>MsSharedLib72</DefaultStrongNameCert> |
| 17 | + <!-- Use NuGet SNK by default for all projects --> |
| 18 | + <PropertyGroup Condition="'$(SignWithNuGetKey)' == 'true'"> |
| 19 | + <AssemblyOriginatorKeyFile>$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'keys', 'NuGetKey.snk'))</AssemblyOriginatorKeyFile> |
| 20 | + <StrongNameCert>67</StrongNameCert> |
17 | 21 | </PropertyGroup> |
18 | 22 |
|
19 | | - <PropertyGroup Condition = " Exists($(StrongNameKey)) "> |
20 | | - <SignAssembly>true</SignAssembly> |
| 23 | + <!-- Use MSFT SNK for all NuGet.Core projects and since we do not own MSFT SNK we can only delay sign the assemblies. --> |
| 24 | + <PropertyGroup Condition="'$(SignWithMicrosoftKey)' == 'true'"> |
| 25 | + <AssemblyOriginatorKeyFile>$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'keys', '35MSSharedLib1024.snk'))</AssemblyOriginatorKeyFile> |
| 26 | + <StrongNameCert>MsSharedLib72</StrongNameCert> |
| 27 | + </PropertyGroup> |
| 28 | + |
| 29 | + <PropertyGroup Condition="'$(SignWithNuGetKey)' == 'true' Or '$(SignWithMicrosoftKey)' == 'true'"> |
21 | 30 | <DelaySign Condition="'$(IsXplat)' != 'true'">true</DelaySign> |
22 | 31 | <PublicSign Condition="'$(IsXplat)' == 'true'">true</PublicSign> |
23 | | - <AssemblyOriginatorKeyFile Condition = " '$(AssemblyOriginatorKeyFile)' == '' ">$(StrongNameKey)</AssemblyOriginatorKeyFile> |
24 | | - <StrongNameCert Condition="'$(StrongNameCert)' == ''">$(DefaultStrongNameCert)</StrongNameCert> |
25 | 32 | </PropertyGroup> |
26 | 33 |
|
| 34 | + <ItemGroup> |
| 35 | + <!-- All InternalsVisibleTo are supposed to be tests so update them with the public key from Test.snk --> |
| 36 | + <InternalsVisibleTo Update="@(InternalsVisibleTo)" PublicKey="0024000004800000940000000602000000240000525341310004000001000100A5276DF8650A58CB43396DC7B3D395F30A82D0D1FA98FBCFE3ABEAD5DE0B1DB6764347A0F6BF0B060A27C202CCD122DB5DED8F596CEBE2ECC3A6629015EEB96C94F6B9E8185D4ACC84C376FF6B1C3147431A4D55CB5736DB97A9E88FCC47D9193F4DB5896DC5817E5D0CBD2641726E7431990BCD2DD7FA1D28493D0CFD9DCFA4" /> |
| 37 | + |
| 38 | + <!-- DynamicProxyGenAssembly2 is the assembly generated by mocks and are signed with a known key --> |
| 39 | + <InternalsVisibleTo Update="DynamicProxyGenAssembly2" PublicKey="0024000004800000940000000602000000240000525341310004000001000100C547CAC37ABD99C8DB225EF2F6C8A3602F3B3606CC9891605D02BAA56104F4CFC0734AA39B93BF7852F7D9266654753CC297E7D2EDFE0BAC1CDCF9F717241550E0A7B191195B7667BB4F64BCB8E2121380FD1D9D46AD2D92D2D15605093924CCEAF74C4861EFF62ABF69B9291ED0A340E113BE11E6A7D3113E92484CF7045CC7" /> |
| 40 | + |
| 41 | + <!-- Test.Utility is shipped so is singed with the NuGet key --> |
| 42 | + <InternalsVisibleTo Update="Test.Utility" PublicKey="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" /> |
| 43 | + </ItemGroup> |
27 | 44 | </Project> |
0 commit comments