PC Review


Reply
Thread Tools Rating: Thread Rating: 3 votes, 3.67 average.

Using resources in satellite assemblies with ASP.NET (semi-newbie)

 
 
=?Utf-8?B?RFQ=?=
Guest
Posts: n/a
 
      4th Apr 2005
I've read the ASP.NET QuickStart Tutorial "Working with Resource Files" about
how to use satellite assemblies for resources in ASP.NET, and I've gotten it
to work... but I don't really understand HOW it works.

My confusion regards how the tutorial uses one name (qq.dll in \bin) in Step
1 for the assembly containing the default resources, but then uses a
different name (eg: qq.resources.dll in \bin\es-MX) in Step 3 for the
assemblies containing the localized resources. Then in Step 2 it shows the
app loading the resource assembly:

Dim a As Assembly = Assembly.Load("qq")

But how does the above method successfully load the qq assembly (from \bin)
when I don't over-ride currentUIcultrue but loads qq.resources (from
\bin\es-MX, when currentUIculture = "es-MX")?

(Yes, I understand that the search is based on the currentUIculture, but how
does it work since the default and culture-specific assemblies don't have the
same name?)

In short, how does a load for assembly "qq" result ever result in assembly
"qq.resource" being loaded?

Thanks,

DT







 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      4th Apr 2005
This section in MSDN covers it all:

http://msdn.microsoft.com/library/de...asp?frame=true

This specifically discusses the resource assembly probing and fallback mechanism:

http://msdn.microsoft.com/library/de...sourcesanchor1

-Brock
DevelopMentor
http://staff.develop.com/ballen



> I've read the ASP.NET QuickStart Tutorial "Working with Resource
> Files" about how to use satellite assemblies for resources in ASP.NET,
> and I've gotten it to work... but I don't really understand HOW it
> works.
>
> My confusion regards how the tutorial uses one name (qq.dll in \bin)
> in Step 1 for the assembly containing the default resources, but then
> uses a different name (eg: qq.resources.dll in \bin\es-MX) in Step 3
> for the assemblies containing the localized resources. Then in Step 2
> it shows the app loading the resource assembly:
>
> Dim a As Assembly = Assembly.Load("qq")
>
> But how does the above method successfully load the qq assembly (from
> \bin) when I don't over-ride currentUIcultrue but loads qq.resources
> (from \bin\es-MX, when currentUIculture = "es-MX")?
>
> (Yes, I understand that the search is based on the currentUIculture,
> but how does it work since the default and culture-specific assemblies
> don't have the same name?)
>
> In short, how does a load for assembly "qq" result ever result in
> assembly "qq.resource" being loaded?
>
> Thanks,
>
> DT
>




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assemblies and satellite assemblies Matze Microsoft C# .NET 0 18th Jun 2008 01:07 PM
Loading resources from satellite assemblies of reflection loaded assemblies.. npthomson@gmail.com Microsoft C# .NET 0 23rd Nov 2006 06:08 PM
Dynamically creating satellite assemblies with embedded resources =?Utf-8?B?Tm90cmUgUG91YmVsbGU=?= Microsoft Dot NET Framework 2 10th Sep 2004 11:28 AM
Resource manager load resources from multiple satellite assemblies? Notre Poubelle Microsoft Dot NET Framework 0 21st Jul 2004 10:42 PM
ResourceManager is unable to load resources in satellite assemblies Nils Erik Asmundvaag Microsoft Dot NET 3 23rd Jun 2004 07:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:20 AM.