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 8101679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:02:25+00:00 2026-06-05T23:02:25+00:00

I have a signed class library that I want to create assemblies for via

  • 0

I have a signed class library that I want to create assemblies for via the sgen tool. However, I get an error when I try to run the following command:

$ sgen.exe /a:testsign.dll /force /compiler:/keyfile:..\..\testsign.pfx /verbose /n
Error: Unable to generate a temporary class (result=1).
error CS1548: Cryptographic
failure while signing assembly ‘[…path…]\TestSign.XmlSerializers.dll’
— ‘Error signing assembly –
– The parameter is incorrect. ‘

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

I checked the error on MSDN which states that

CS1548 occurs when assembly signing fails. This is usually due to an
invalid key file name, an invalid key file path, or a corrupt key
file.

However, I just created the key, the path is correct and to my knowledge Visual Studio 2010 does not create corrupt keys.

This issue is fairly simple to reproduce.

  1. Using the code pasted here create a new class library.
  2. Create two classes, one class TestSigning and one class Model
  3. go to Project properties > Signing and check the “Sign this assembly”
  4. create a new Strong name key file
  5. open up Visual Studio Command Prompt (2010)
  6. locate the dll and run sgen /a:<dllname> [... as above ...]

My guess is something with the public key for the keyfile.. But I cannot find any sources as to how I inform sgen of what password I have used to protect my key file.

I am not sure how to proceed. the other threads I have looked at here on SO have the same error “header” unable to generate temporary class but different error details, for which none has the Cryptographic failure (that I have found).

  • 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-06-05T23:02:27+00:00Added an answer on June 5, 2026 at 11:02 pm

    Following the instructions in this thread solved this issue. Although it wasn’t done manually with the sgen tool, it was done via Visual Studio.

    That is, the above example is changed to:

    1. as before
    2. as before
    3. as before
    4. as before
    5. Go to the Build tab
    6. Set the Generate serialization assembly to On
    7. Right click the project and select Unload project
    8. Right click the project and select *edit nnn.csproj**
    9. Paste the following snippet somewhere

      <PropertyGroup>
          <SGenUseProxyTypes>false</SGenUseProxyTypes>
          <SGenPlatformTarget>$(Platform)</SGenPlatformTarget>
      </PropertyGroup>
      
    10. Reload and build the project.

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

Sidebar

Related Questions

I have my signed assemblies here, in one of them I have a picture
I have created a class that I've been using as the storage for all
I have an android application in development where I frequently create signed APKs in
The situation: I have a class library, called RT.Servers , containing a few resources
I build a .NET Class Library project that accesses the mshtml.HTMLDocument when called (from
I have a template class, and would like to write a member method that's
Which class member can I use to return the number of members, that have
I have a c# solution that contains multiple c# class libraries. I am being
More specifically, a class library assembly. My initial thoughts: Have some designated administrators do
We have a vendor-provided Jar that contains a class we wish to extends and/or

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.