locked
existence of .resource files,satellite assemblies RRS feed

  • Question

  • User-14001990 posted

    Dear All,

    I have created a multilingual site with three languages namely English,French and Bengali.

    The application is working fine but some aspects of one article which I read in this context is creating confusion.

    The article is http://support.microsoft.com/kb/893663

    If u read the portion Resource files it is creating confusion.

    It says" All .resx, .resource files, and files that have the Build Action attribute set to Embedded Resource that are added to an ASP.NET project in Visual Studio .NET, are automatically compiled and embedded within application assembly as part of its manifest."

    What is meant by the above statement?

    Further, "This can even be done manually by using the Resource File Generator (RESGEN) utility via a Visual Studio .NET command prompt. For more information, visit the following MSDN Web site:

    http://msdn.microsoft.com/en-us/library/ccec7sz1(vs.71).aspx (http://msdn.microsoft.com/en-us/library/ccec7sz1(vs.71).aspx) "
     
    Now resgen.exe converts .txt, .resx files into .resource files and vice-versa.I don't find any resource file being created,only .resx files which were created by me.
     
    Regarding satellite assemblies it is equally confusing.
    It says some condition for their creation but no concrete example about their creation and usage in place of .resx files for displaying appropriate culture.
     
    Can some one clear the confusion in this article.
     
    Thanks for ur efforts.
     
     
    Monday, April 25, 2011 9:18 AM

All replies

  • User877341716 posted

    In your multi-lingual application, both the resources and the satellite assembly file will serve the purpose. However, it is upto the development team which approach to go for. Generally, satellite assembly approach is used because the language strings are in binary format (as DLL) and can shipped safely and securely.

    For satellite assembly example, pls see below link

    http://www.codeproject.com/KB/aspnet/SatelliteAssemblies.aspx

    Tuesday, April 26, 2011 5:13 AM
  • User-14001990 posted

    Hi Sudeep,

    The usefulness of Satellite Assemblies is clear rom ur reply.

    What is not clear is the following:

    1) If we write Strings.resx or Strings.de-DE.resx, the satellite assemblies will be created automatically during compile time or whether we have to create it manually.

    2) How do u set Build Action to Embedded Resources for resource files(.resx)? Once u do it then what happens - it gets converted to satellite assemblies or something else?

    Thanks for ur reply

    Wednesday, April 27, 2011 1:22 AM
  • User877341716 posted

    You have to use Assembly Linker tool (al.exe) to create/implement the satellite assembly. I won't happen automatically. For more info on al.exe refer the link below

    http://msdn.microsoft.com/en-us/library/c405shex(v=vs.80).aspx 

    For point#2 - You can do this from your Project Settings->Build option

     

    Wednesday, April 27, 2011 3:32 AM
  • User-14001990 posted

    Hi,

    I am aware of Al.exe.I think it is meant to generate satellite assemblies for non asp.net applications.

    For asp.net applications the generation of those assemblies should be automatic at compile time provided the syntax conditions for them is met.

    Are u telling that creation of satellite assemblies is entirely manual and has to be done for each resource file by using AL.exe.

    The Al.exe command syntax is given below:

    Usage: al [options] [sources]
    Options: ('/out' must be specified)

      /? or /help               Display this usage message
      @<filename>               Read response file for more options
      /algid:<id>               Algorithm used to hash files (in hexadecimal)
      /base[address]:<addr>     Base address for the library
      /bugreport:<filename>     Create a 'Bug Report' file
      /comp[any]:<text>         Company name
      /config[uration]:<text>   Configuration string
      /copy[right]:<text>       Copyright message
      /c[ulture]:<text>         Supported culture
      /delay[sign][+|-]         Delay sign this assembly
      /descr[iption]:<text>     Description
      /e[vidence]:<filename>    Security evidence file to embed
      /fileversion:<version>    Optional Win32 version (overrides assembly versio
      /flags:<flags>            Assembly flags  (in hexadecimal)
      /fullpaths                Display files using fully-qualified filenames
      /keyf[ile]:<filename>     File containing key to sign the assembly
      /keyn[ame]:<text>         Key container name of key to sign assembly
      /main:<method>            Specifies the method name of the entry point
      /nologo                   Suppress the startup banner and copyright message
      /out:<filename>           Output file name for the assembly manifest
      /platform:<text>          Limit which platforms this code can run on; must
                                one of x86, Itanium, x64, or anycpu (the default)
      /prod[uct]:<text>         Product name
      /productv[ersion]:<text>  Product version
      /t[arget]:lib[rary]       Create a library
      /t[arget]:exe             Create a console executable
      /t[arget]:win[exe]        Create a Windows executable
      /template:<filename>      Specifies an assembly to get default options from
      /title:<text>             Title
      /trade[mark]:<text>       Trademark message
      /v[ersion]:<version>      Version (use * to auto-generate remaining numbers
      /win32icon:<filename>     Use this icon for the output
      /win32res:<filename>      Specifies the Win32 resource file

    Sources: (at least one source input is required)
      <filename>[,<targetfile>] add file to assembly
      /embed[resource]:<filename>[,<name>[,Private]]
                                embed the file as a resource in the assembly
      /link[resource]:<filename>[,<name>[,<targetfile>[,Private]]]
                                link the file as a resource to the assembly

     

    In this the syntax for the source is confusing.If I have a resource file in a web app how do I specify the paths, it should be relative or absolute.

    A proper example is necessary.

    For point#2 - You can do this from your Project Settings->Build option

    In the project properties the build option does not have that option.

    Thanks for ur reply.

     

    Wednesday, April 27, 2011 6:03 AM
  • User877341716 posted

    In the project properties the build option does not have that option

    Which version of VS are you using ?

    If I have a resource file in a web app how do I specify the paths, it should be relative or absolute.

    Use absolute path

    Friday, April 29, 2011 1:45 AM
  • User-14001990 posted

    Are u telling that creation of satellite assemblies is entirely manual and has to be done for each resource file by using AL.exe.?(i did not get answer to this q)

    Which version of VS are you using ?

    I am using VS 2005.

    A proper example of Al.exe usage with explanation is necessary.Hope u can give one?

    Thanks.

     

     

    Friday, April 29, 2011 6:22 AM