Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 539051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:05:45+00:00 2026-05-13T10:05:45+00:00

I manage an open-source project and would like to sign the binaries that are

  • 0

I manage an open-source project and would like to sign the binaries that are released in the project’s binary package. I use Visual Studio csproj and sln files to manage and build my project, and also distribute these files as part of the project’s source packages.

How can I sign the produced binaries of my build and not have to distribute the snk key-pair file? If I use Visual Studio to sign the assemblies, each project file now needs a copy of the key-pair in order to build. I’m not comfortable with distributing the key-pair, even if it is password protected.

Edit:

Another caveat is that some assemblies in the project grant friend access via InternalsVisibleToAttribute, and build those friends via a project reference. Consequently, such assemblies need to use a strong name when referring to a signed assembly. However, if the key-pair is not distributed then how can end-users build the sources and maintain the project relationships? If a temporary key-pair file is used, won’t the public key token of the signed assemblies change, breaking the InternalsVisibleToAttribute references?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:05:46+00:00Added an answer on May 13, 2026 at 10:05 am

    Sharptooth’s solution works well if the only assembly references in the code are those encoded in the project files. If your project refers to other assemblies via InternalsVisibleToAttribute or other means where a strong-name string is required, then it is not feasible to build the repository-sources with a temporary key. Doing so will change the public key references that are present in the strong-name strings and break the code.

    This is the case in my application so I needed to adopt a different approach.

    I basically created a copy of the sln and csproj files in a separate folder heirarchy and modified the csproj files as follows.

    • Transformed all file references to links, pointing to the original sources.
    • Copied and modified each AssemblyInfo.cs file to contain uses of InternalsVisibleToAttribute with a strong name.
    • Modified each csproj file so that the snk file reference is a relative path (removes the need to copy the snk file to each project)

    I first did all of this manually, but then realized that this can be automated in a straightforward manner. The first and third steps may be implemented with an XSLT, where as the second step can be implemented with a regex search/replace function.

    Since I need to maintain two solutions now, it makes sense to automate this task to avoid future headaches.

    The sources in the repository do not build assemblies with strong-names, which is fine, since I wouldn’t want to impose any build restrictions or processes on end-users.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Visual Studio language extensibility Does anybody know whether there's an open source (or paid)
We use multiple open source projects in our project. We have many changes spread
I have been looking round for an open-source CMS framework that I can use
I'm looking for a free/open source collaborative project manager that can be deployed internally
I am considering using Maven for a Java open source project I manage. In
What is the best open-source library to manage X10 devices from Java?
I want to use the TFS WebAccess to open/manage work items. I have found
I am working alone at the beginning of a sizable open source project and
I'm a contributor to a Java Open Source project which integrates with Hibernate. I'm
I'm playing with an idea of creating client that would use the torrent protocol

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.