How do you change the assembly language in a C# application? There is a problem when we are using
[assembly:AssemblyCulture("en-US")]
There is an error:
Error emitting'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty'
You should use
[assembly: AssemblyCulture("")]
as the compiler suggests.
To define default culture, you should use
[assembly: NeutralResourcesLanguage("en-US")]
From the documentation:
The attribute is used by compilers to distinguish between a main assembly and a satellite assembly. A main assembly contains code and the neutral culture's resources. A satellite assembly contains only resources for a particular culture, as in [assembly:AssemblyCultureAttribute("de")]. Putting this attribute on an assembly and using something other than the empty string ("") for the culture name will make this assembly look like a satellite assembly, rather than a main assembly that contains executable code. Labeling a traditional code library with this attribute will break it, because no other code will be able to find the library's entry points at runtime.
To summarize: This attribute is used internally by the framework to mark the satellite assemblies automatically created when you add localized resources to your project. You will probably never need to manually set this attribute to anything other than "".
ref: https://stackoverflow.com/questions/7402206/in-a-c-sharp-class-project-what-is-assemblyculture-used-for
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With