-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strong-name sign assemblies #66
Strong-name sign assemblies #66
Conversation
@@ -10,6 +10,8 @@ | |||
<CodeAnalysisRuleSet>..\stylecop.analyzers.ruleset</CodeAnalysisRuleSet> | |||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | |||
<NoWarn>1591</NoWarn> | |||
<SignAssembly>true</SignAssembly> | |||
<AssemblyOriginatorKeyFile>SampleCommand.snk</AssemblyOriginatorKeyFile> | |||
</PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does SampleCommand need to be signed? I'd think that we could get away with just signing the non-test binaries.
@@ -9,6 +9,8 @@ | |||
<CodeAnalysisRuleSet>..\stylecop.analyzers.ruleset</CodeAnalysisRuleSet> | |||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | |||
<NoWarn>1591</NoWarn> | |||
<SignAssembly>true</SignAssembly> | |||
<AssemblyOriginatorKeyFile>MedallionShell.Tests.snk</AssemblyOriginatorKeyFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the tests project need to be signed?
@@ -8,6 +8,8 @@ | |||
<Nullable>enable</Nullable> | |||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | |||
<CodeAnalysisRuleSet>..\stylecop.analyzers.ruleset</CodeAnalysisRuleSet> | |||
<SignAssembly>true</SignAssembly> | |||
<AssemblyOriginatorKeyFile>MedallionShell.ProcessSignaler.snk</AssemblyOriginatorKeyFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to use distinct snk files for each assembly? I feel like with MSFT assemblies I always see the same public key used (in binding redirects), which is kind of nice for knowing you've copied it correctly.
MedallionShell/AssemblyAttributes.cs
Outdated
@@ -1,3 +1,3 @@ | |||
using System.Runtime.CompilerServices; | |||
|
|||
[assembly: InternalsVisibleTo("MedallionShell.Tests")] | |||
[assembly: InternalsVisibleTo("MedallionShell.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d4e301e51cf90722627e9a77bdce4bf73c8d4d33d7ebe1058050002627cc9a68388dfe94aa944e98a928b61dd160eb31aca338033729248ecec0955bf0e02e12d7cfb90534ed602e1ec78905ccd0062cdcc23b4ae2017a98849a72bb3c7e07e0bebcf31a03df79c01fca07486e16133b5d7699781b7910e5f353e2601f7cfa8")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For my understanding, how would one come up with this public key value?
- In binding redirects, it uses a much shorter value for the key. Is that available here?
Checking in private key files to strong-name sign all assemblies. For more information on the reasoning for strong-naming assemblies, see this article.
This submission is in response to Issue #65.