Version resource in satellite assembly

G

Guest

I have two question regarding the version resource that is generated for a
satellite assembly.

1) I have a file in my C# console app project called
StringResources.en-US.resx. When I build the project, a satellite assembly is
built and placed in the appropriate subfolder (en-US). The satellite
assembly has a version #, however, none of the other version information that
is part of the main app (set in AssemblyInfo.cs) is passed into this
Satellite Assembly. My question is, how can I have that version information
set on the satellite assembly when it is built through the IDE?
2) If I build the satellite assembly via al.exe I can of course overcome
problem #1. However, whether I build it via al.exe or via the IDE, the
Language attribute of the version information always reads Language Neutral
(when viewing the version tab of the file properties), even though the dll is
built with a specified culture (in this case, en-US). I cannot find a way to
control that particular version attribute as I would in a Win32 application.
Obviously, the main app of the assembly should be Language Neutral, however,
I would expect that the satellite assemblies which are culture specific would
have that attribute set to the appropriate language. How can I accomplish
this?
 
J

Jeffrey Tan[MSFT]

Hi James,

Thanks for your post.

#1, I have done a test for this issue. I enabled Localization in the
Winform project, and specify version information in AssemblyInfo.cs file
like this:
[assembly: AssemblyVersion("1.5.5.5")]
When compiling the entire project, my main assembly will get the version
number of 1.5.5.5 and all the satellite assemblies in corresponding
language folders will have 1.5.5.5 version.

Do you have different result on your side?

#2, Using Al.exe, we should can control the assembly information easily.
Specificly, we can set the version with /version option, and culture
information with /culture option. Please refer to the link below:
"Creating Satellite Assemblies"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconcreatingsatelliteassemblies.asp

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

I'm not having a problem with the version number. Using your example below,
in #1, the version number does get propogated to the satellite assembly, but
that is all. The company information, copyright, etc. do not. That is the
problem. This may be by design, but I'm wondering if there is a way around
it besides using al.exe.

The second problem is that there is no way to set the Language attribute.
If you open the properties for an assembly and select the version tab, there
are many attributes, such as company name, copyright, etc. Among those is
one called language. When I create (using al.exe) a satellite assembly I can
specifiy the culture, copyright, company, etc. I cannot, however, set that
language attribute. My expectation was that if I set the culture to, for
example en-US, that the language attribute would reflect that, but it simply
says Language Neutral, which to me is not correct.
 
G

Guest

I'm not having a problem with the version number. Using your example below,
in #1, the version number does get propogated to the satellite assembly, but
that is all. The company information, copyright, etc. do not. That is the
problem. This may be by design, but I'm wondering if there is a way around
it besides using al.exe.

The second problem is that there is no way to set the Language attribute.
If you open the properties for an assembly and select the version tab, there
are many attributes, such as company name, copyright, etc. Among those is
one called language. When I create (using al.exe) a satellite assembly I can
specifiy the culture, copyright, company, etc. I cannot, however, set that
language attribute. My expectation was that if I set the culture to, for
example en-US, that the language attribute would reflect that, but it simply
says Language Neutral, which to me is not correct.
 
J

Jeffrey Tan[MSFT]

Hi James,

Thanks for your feedback.

The information on the exe property page is the Win32 resource information,
not the .Net resource information. If you use ILDasm to view any satellite
assembly in the language directory, we will see the language attribute in
the assembly manifest.

For other Win32 resources, such as company info, copyright etc..., it seems
that VS.net IDE will only generate in the main assembly not for the
satellite assembly. However, we can use Al.exe with corresponding options
to embed the information in the satellite assembly.

I think this must be the limitation of VS.net IDE. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jeffrey Tan[MSFT]

Hi James,

Thanks for your feedback.

No, VS.net IDE can generates win32 resources to the .Net assembly with
several attributes, such as AssemblyCompanyAttribute,
AssemblyCopyrightAttribute etc.. However, VS.net IDE can not generate win32
resources for satellite assemblies. In order to generate win32 resources
into satellite assembly, we have to use AL.Exe use corresponding command
line options to get it done.

Hope this will be more clarify.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top