When updating the eBus SDK version, recompilation of custom programs is required.

Q: When updating the eBus SDK version on a PC, if I have programmed in C#, projects compiled with the previous version and .exe files become unusable, requiring recompilation of the program. Does this mean there is no full compatibility in the case of C#?

 

A:

This is because Strong Name.
 
A strong name is a unique identifier for an assembly that uses four attributes to uniquely identify it:
 
1. File name (without the extension)
2. Version number
3. Culture ID
4. Public Key Token
 
Specifically, it refers to values commonly seen in project files like this:
 
FarPoint.Win, Version=3.0.2010.2005, Culture=neutral, PublicKeyToken=a5fa960294d899e7
 
Do all assemblies have strong names?
 
To assign a strong name to an assembly, it needs to be signed by a public-private key pair provided by the assembly's publisher. Signing is done by specifying a key file for assembly signing in the project properties under the 'Signing' tab.
 
Assemblies that are not signed do not have strong names. Assemblies without strong names typically have a public key token value like this: WeakAssembly, Version=1.0.0.0, Culture=neutral.
 
Note that the signing mentioned here is different from the self-signing done by the publisher, which is not equivalent to the SSL certificate used for HTTPS. This signing is for preventing tampering with the assembly and does not provide the same level of authentication as an SSL certificate.
 
Differences in Reference Setting due to Strong Names?
 
Assemblies with strong names validate during runtime that the three keys forming the strong name (file name, version, public key token) match. If any of them differ, the assembly won't execute. Culture is found to be unrelated to loading.
 
Assemblies without strong names load based only on the file name (without the extension). Version and culture are ignored.
 
Is it true that version and culture are ignored when there's no strong name?
 
Yes, it's true. We created an assembly with the same file name but different versions (2.2.2.2) and cultures (Irish), and it worked interchangeably.
 
What happens when you change the keys forming the strong name (file name, version, public key token) for assemblies with strong names?
 
We tested all possible scenarios:
 
- Different version number: The assembly couldn't be loaded.
- Different public key token: The assembly couldn't be loaded.
- Different culture: The assembly could be loaded.
 
How can you check whether the assemblies you've referenced have strong names or not?
 
You can check this by looking at the 'Strong Name' property in the properties page of the referenced assembly. If it's 'True,' the assembly has a strong name; if it's 'False,' the assembly doesn't have a strong name."
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.