locked
AssemblyInfoTask not signing assemblies RRS feed

  • Question

  • I have the following property group in the AssemblyInfoTask:

    <PropertyGroup>
    <
    AssemblyIncludeSigningInformation>false</AssemblyIncludeSigningInformation>
    <
    AssemblyDelaySign>false</AssemblyDelaySign>
    <
    AssemblyKeyFile>D:\Builds\eDiets\Key\eDietsPrivateKeyFile.snk</AssemblyKeyFile>
    <
    AssemblyKeyName></AssemblyKeyName>
    </
    PropertyGroup>

    I am running my builds through TeamBuild, and I am importing AssemblyInfoTask. My original intent was to only automate build and revision numbers, but ive also added this. It changes the versioning fine, but will not sign my assemblies. Can anyone help me out?

    Monday, August 14, 2006 2:56 PM

Answers

  • Keith,

    While this adds the metadata to the assemblyinfo file, it won't actually turn on signing. I believe you also have to add a /p:SignAssembly=true to the command line. If that doesn't work either, try http://blogs.msdn.com/msbuild/archive/2005/09/26/474079.aspx. If THAT doesn't work, post back and let me know.

    Neil

    Monday, August 14, 2006 6:27 PM
  • If I had the signing information to the assembly of the individual projects it works. However, there are a great number of projects in our source control, and I was hoping to find a way to automatically sign using TeamBuild and the information in the AssemblyInfoTask targets.
    Tuesday, August 15, 2006 6:52 PM

All replies

  • Keith,

    While this adds the metadata to the assemblyinfo file, it won't actually turn on signing. I believe you also have to add a /p:SignAssembly=true to the command line. If that doesn't work either, try http://blogs.msdn.com/msbuild/archive/2005/09/26/474079.aspx. If THAT doesn't work, post back and let me know.

    Neil

    Monday, August 14, 2006 6:27 PM
  • /p:SignAssembly=true is an MSBuild argument correct? How would I do this using a TeamBuild project using TFSBuild?
    Monday, August 14, 2006 8:34 PM
  • Change the property for AssemblyIncludeSigningInformation in targets file

    <PropertyGroup>
    <
    AssemblyIncludeSigningInformation>true</AssemblyIncludeSigningInformation>
    <
    AssemblyDelaySign>false</AssemblyDelaySign>
    <
    AssemblyKeyFile>D:\Builds\eDiets\Key\eDietsPrivateKeyFile.snk</AssemblyKeyFile>
    <
    AssemblyKeyName></AssemblyKeyName>
    </
    PropertyGroup>

    Monday, August 14, 2006 9:34 PM
  • I set that property to true, but it still does not sign them.
    Tuesday, August 15, 2006 2:06 PM
  • Also set the SignAssembly property to true in your project file and see if that does the trick.

    Neil

    Tuesday, August 15, 2006 6:39 PM
  • If I had the signing information to the assembly of the individual projects it works. However, there are a great number of projects in our source control, and I was hoping to find a way to automatically sign using TeamBuild and the information in the AssemblyInfoTask targets.
    Tuesday, August 15, 2006 6:52 PM
  •  Neil Enns MSFT wrote:

    Also set the SignAssembly property to true in your project file and see if that does the trick.

    Neil

     

    Is there a way to have TeamBuild sign all of my assemblies without needing to involve each individual project file inside of that build?

    Tuesday, August 15, 2006 7:06 PM