The assembly is "not signed correctly." A warning

I have a mobile .NET solution and decided to sign assemblies. Compilation ends without errors, but gives a warning

'CompactUI.Business.PocketPC.asmmeta, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null' is not signed correctly.

The application works fine, but I can no longer open the constructor for forms using this assembly. Again the designer says

'CompactUI.Business.PocketPC.asmmeta, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null' is not signed correctly.

with stack info:

in Microsoft.CompactFramework.Build.AsmmetaBindingService.GetAsmmetaAssembly (String sourceAssemblyPath, Boolean verify) in Microsoft.CompactFramework.Build.AsmmetaBindingService.LoadAsmMetaAssembly (Assembly sourceAssembly, String hintPath, IDemeterTeviceTemeterTeviceTermodeviceTemeterTeviceTemeterTevicePerviceMemeterTeviceTemeterTeviceTemeterTeviceTeryMeteviceTeviceTermodeviceTemeterTeviceTech ) in Microsoft.CompactFramework.Build.MetadataService.GetTypeAttributes (type DesktopType) in Microsoft.CompactFramework.Design.DeviceCustomTypeDescriptor.GetAttributes () ...

What causes this?

Edit: Nicholas proposal does not solve the problem

I have a form that contains common properties that are basic for each form in the presentation layer

public class CustomForm : Form { ... } 

This form is in the business layer causing the warning. Each form that inherits from this base form causes a problem when viewed in the designer.

+4
source share
3 answers

Make sure the assembly was not generated using the "delay sign" sign. This will cause the assembly to declare that it was signed when there is instead a null placeholder instead. This will fail to validate the name of the strong name. You can also check this page on MSDN for more information: " Assemblies must have valid strong names "

+1
source

I'm confused, you say you signed assmeblies, but your public key token is NULL, if you signed it assmbley, then you must specify the public key that is generated instead of null. Perhaps I do not completely understand this problem. Try removing the link to CompactUI.Business.PocketPC.asmmeta and adding the signed version again.

0
source

Cause

The assembly is not signed with a strong name, a strong name cannot be verified, or a strong name is not valid without the current computer registry settings. Rule description

This rule retrieves and validates the strong assembly name. A violation occurs if one of the following statements is true:

 * The assembly does not have a strong name. * The assembly was altered after signing. * The assembly is delay-signed. * The assembly was incorrectly signed, or signing failed. * The assembly requires registry settings to pass verification. For example, the Strong Name tool (Sn.exe) was used to skip verification for the assembly. 

A strong name protects clients from unknowingly loading an assembly that has been tampered with. Assemblies without strong names should not be deployed outside of very limited scenarios. If you share or redistribute assemblies that are improperly signed, the assembly may be changed, the general language runtime may not load the assembly, or the user may need to disable validation on his or her computer. A node without a strong name has the following disadvantages:

 * Its origins cannot be verified. * The common language runtime cannot warn users if the contents of the assembly have been altered. * It cannot be loaded into the global assembly cache. 

Note that in order to load and analyze the assembly with a delay, you must disable validation for the assembly.

-2
source

All Articles