"No strong name" SOLUTION

Source: Internet
Author: User

What is the error "no strong name" during debugging?
--------------------------------------------------------------------------------

I have now written a testProgram
Process:
Dataaccess. a aa = new dataaccess. ();
Dataaccess is a class library.
A is the class
This error occurs during compilation.
Error example
Thank you!

--------------------------------------------------------------------------------

A strong name consists of the Assembly Identifier-its simple text name, version number, and regional information (if provided)-plus the public key and digital signature. Strong names are generated using the corresponding private key through the Assembly file (the file that contains the Assembly List, and therefore contains the names and hashes of all the files that constitute the Assembly. Microsoft Visual Studio. NET and other development tools provided in the. NET Framework SDK can assign a strong name to an assembly. The assembly with the same strong name should be the same.
By issuing an assembly with a strong name, you can ensure the global uniqueness of the name. Strong names also meet the following requirements:
Strong names depend on unique key pairs to ensure the uniqueness of names. No one generates the same Assembly name as the one you generated, because the name of the Assembly generated with one private key is different from that of the Assembly generated with another private key.
Strong names protect the version of the Assembly. Strong names ensure that no one can generate a later version of your assembly. Users can be confident that the version of the Assembly they load comes from the same publisher who created the version (the application is generated using this version.
Strong names provide reliable integrity checks. After passing the. NET Framework security check, you can be sure that the Assembly content has not been changed after it is generated. However, note that a strong name or a strong name does not imply a level of trust, such as the trust provided by digital signatures and support certificates.
When referencing a program with a strong name, you should be able to benefit from this, such as version control and naming protection. If this Assembly with a strong name references an assembly with a simple name later (the latter does not have these benefits), you will lose the benefit of using an assembly with a strong name, DLL conflicts still occur. Therefore, an assembly with a strong name can only reference other assembly with a strong name.

--------------------------------------------------------------------------------

Use sn.exe to generate a key for this space
example
the following command creates a random key pair and stores it in keypair. SNK.
Sn-K keypair. SNK
the following command stores the key in keypair. SNK in the container mycontainer in the strong name CSP.
Sn-I keypair. SNK mycontainer
the following command extracts the public key from keypair. SNK and stores it in publickey. SNK.
Sn-P keypair. SNK publickey. SNK
the command below verifies the Assembly myasm. dll.
Sn-V myasm. dll
the following command deletes mycontainer from the default CSP.
Sn-D mycontainer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.