Skip to content

Conversation

@blowdart
Copy link
Contributor

@blowdart blowdart commented Oct 8, 2025

Fixes #198

  • Creates strongname keypair and add to solution
  • Add strongnaming to directory.props so all assemblies are strong named
  • Update InternalsVisible to in TestLogger\Assembly.cs to include strongname

Reference: Library author guidance for Strong naming

If you want to generate your own strong name keypair rather than blindly trust mine (it doesn't really matter, they're not a security boundary) then you would do the following

  1. Open the VS Developer Command Prompt or VS Developer Powershell
  2. Change directory to your solution directory
  3. Create a new keypair, run sn -k strongNameKey.snk (docs)
  4. Extract the public key to a temporary file, run sn -p strongNameKey.snk strongNameKey.pub (docs)
  5. Get the full public key in ASCII that assemblies with be signed with, run sn -tp strongNameKey.pub
  6. Copy the five lines of Public key (hash alghorithm: sha1) into your clipboard
  7. Update the InternalsVisible to attribute in TestLogger\assembly.cs to use the new public key.
    You'll have to delete the \r\n that's there when you paste the value into VS (your choice of code editor may vary)

I'm happy to put my work hat on (the .NET Security PM 😁) and answer any questions you might have.

Add strongnaming to directory.props
Update internalsvisible to in TestLogger to include strongname
@codito codito merged commit dc01659 into spekt:master Oct 8, 2025
3 checks passed
@codito
Copy link
Contributor

codito commented Oct 8, 2025

Thanks @blowdart!

This was referenced Oct 8, 2025
This was referenced Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use v7 in test projects that are strong named.

2 participants