I've got it!

From: M. (anonymous_at_discussions.microsoft.com)
Date: 03/14/04


Date: Sun, 14 Mar 2004 11:25:04 -0800

Hi.

I found, that you must create a binary resource with
resgen, before you can create satellite assembly from it.
Altough this will create something like satellite
assembly:

al /t:lib /embed:Form1.sk-
SK.resx /out:MyApplication.resources.dll

this is not a valid sat. assmbly. and application will
not recognize it.

As first, you must generate binary resource file with
resgen. The
form: "ApplicationName.ResourceName.resources" is
important.

resgen Form1.sk-SK.resX MyApplication.Form1.sk-
SK.resources

As second, you must embed it to sat. assembly.
The /culture switch is important.

al /t:lib /culture:en-US /embed:MyApplication.Form1.sk-
Sk.resources /out:MyApplication.resources.dll

This sat. assmbly works as expected. Yeah!

Thanks goes to ildasm... :-)

M.

>-----Original Message-----
>Hi.
>
>I've question about resources. I've found this in MSDN:
>
>"When you are finished creating .resources files with
>Resgen.exe, use the Assembly Linker (Al.exe) to either
>embed the resources in a runtime binary executable or
>compile them into satellite assemblies."
>
>I think, that resgen isn't required. I can do this:
>
>al /embed:Form1.resx /out:Form1Res.dll
>
>and I have resource-only assembly. Right? So when I get
>question, like what is the most effective method to
>create resource-only assembly, can I skip generating
>binary resource by resgen?
>
>Thanks.
>
>M.
>
>P.S. I just get similair question on my MeasureUP. The
>explanation tells this:
>
>"A .resources file is a binary representation of the
>human readable resource file and is generated by the
>Resource File Generator (Resgen.exe) utility. It can
then
>be embedded into a satellite assembly and distributed
>with the application."
>.
>



Relevant Pages

  • Re: default resource file without culture information is performance hit?
    ... NeutralResourcesLanguageAttribute and compares it with CurrentUICulture. ... other places for the satellite assemblies in most situations. ... Microsoft Online Community Support ... the .net engine will first look for resource file matching current user's ...
    (microsoft.public.dotnet.framework)
  • Re: Using Images of Satellite Assemblies
    ... Ensure you follow all naming and location conventions for satellite ... assemblies. ... Also bear in mind that culture-neutral resources should remain in the main ... assembly as they are expected to be there by the resource fallback process. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Embeeded resources Vs. Content files
    ... > assemblies rather resource assemblies. ... There is no methods/members to be ... Are you not the same Simon Hart that said "you won't be JITing a large ... by accessing the embedded resource or by accessing the file sytem). ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Failed to load resources from resource file, please check your setup
    ... I don't have a stack trace as it isn't happening on ... > they are not loaded like normal assemblies. ... > ResourceManager object tests the thread locale and checks for a satellite ... > resource in the current assembly. ...
    (microsoft.public.dotnet.general)
  • Re: Root namespace
    ... > resource in its caller's assembly and, using ResrouceManager, fetch the ... > need to specify the root namespace. ... > GetString has no problem getting a reference to the caller's assembly. ... This can be true of other assemblies as ...
    (microsoft.public.dotnet.framework)