Strong name, SGEN.exe fail to generate xmlserializer- Please help.. RRS feed

  • Question

  • Hello All,

    I need to sign my assembly and I was able to sign my assemblies using VS designer. One of my assembly is building fine if I don't specify any signing, if I specify signing I get an error,

    Error    1    Generated serialization assembly is not signed: adfdi-excel-xml.XmlSerializers, Version=, Culture=neutral, PublicKeyToken=null. Please specify strong name key file via /compiler:/keyfile:<file> switch.   

    In my scproj file I have the following,

    <Target Name="AfterBuild">
        <SGen BuildAssemblyName="$(TargetFileName)" BuildAssemblyPath="$(TargetDir)" ShouldGenerateSerializer="true" UseProxyTypes="false" ToolPath="$(SGenToolPath)">
          <Output TaskParameter="SerializationAssembly" ItemName="SerializationAssembly" />

    So the SGEN assembly is failing.

    How do I fix this problem?. I tried to add the /c /k switch in the above code and didn;t work. May be I did not use the correct syntax. Could you please help?

    I also tried to run the sgen from command line and got the following error,

    Microsoft (R) Xml Serialization support utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.1432]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Error: Unable to load one or more of the requested types. Retrieve the LoaderExc
    eptions property for more information.

    If you would like more help, please type "sgen /?".

    Tuesday, September 23, 2008 4:16 PM

All replies