Search code examples
c#visual-studio-2012strongnamestrong-named-key

same project different solution sign configuration


I am trying to find way to use the strong name sign as an configuration. My case is: I have project that it include in two different solution. For one solution I want that the project will be sign with strong name key, but for the other solution I want that the project will be without sign.

Currently I declare the signing throw: project->properties->signing.


Solution

  • OK, I got it, just edit proj file manually

     <PropertyGroup Condition="'$(SolutionName)' == 'SolutionToSign' ">
        <snip />
        <SignAssembly>true</SignAssembly>
        <DelaySign>false</DelaySign>
        <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
      </PropertyGroup>