473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

resources in separate assembly - ugly :(

Hi.
We have a resource assembly that is separate and is used by a class
library assembly, a web app, web service set (all in separate
projects). Windows app is also potentially possible.

First of all, VS2005 generates resource wrappers as internal, so we
have to use InternalsVisibleTo to make intellisense etc possible for
resources.
Then, with this model, all the cool localization features of ASP.NET
2.0 are not possible. Is there any way to circumvent this and take
advantage of automatic resource binding, <$ expressions etc if
resources reside in a different assembly?

Dec 24 '06 #1
1 2417
I don't think so. ASP.NET's resource mechanism works through custom
compilation of the raw RESX files and referencing them through a more or
less custom scheme (the resources get compiled into a special resource
assembly with a dynamic name that the provider reads out of). I'm not aware
of a way to extend that to include external resources.

However, nothing is stopping you from calling external resource assemblies
directly through a ResourceManager.You could build your own expression
parser that read resources from external assemblies. The <$ $parsing is
extensible in .NET and you can certainly create your own mechanism for it.

Although that may not be worth it - it's just as easy to use a standard
class expression in the page and make a static method call and call it from
the page:

<%= App.Trans("ResourceFile","ResourcesId") %>

which would work just as well where App.Trans() would read your resource
from the external resource you've created.

+++ Rick ---
"Sergei Shelukhin" <re******@gmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.com...
Hi.
We have a resource assembly that is separate and is used by a class
library assembly, a web app, web service set (all in separate
projects). Windows app is also potentially possible.

First of all, VS2005 generates resource wrappers as internal, so we
have to use InternalsVisibleTo to make intellisense etc possible for
resources.
Then, with this model, all the cool localization features of ASP.NET
2.0 are not possible. Is there any way to circumvent this and take
advantage of automatic resource binding, <$ expressions etc if
resources reside in a different assembly?
Dec 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: KoolistOne | last post by:
I have a template that I would like to include a namespace in but I won't be using that referenced namespace til a few months from now. In the mean time, will that referenced, but not used/called...
1
by: Derick Smith | last post by:
Hi! I am just starting to use .NET and need some help! If I create my own DLL for String resouces using this command: C:\WINNT\MICROS~1.NET\Framework\v1.1.4322\Al /t:lib...
7
by: Ken Allen | last post by:
OK, for a number of reasons I have needed to begin experimenting with resources sooner than I had planned (I had avoided it for now). Step 1: I built the 'reseditor' application that is in the...
0
by: Ajoy Kumar | last post by:
Hi, Firstly, I have created an Assembly with RlinkPMBAPIRes.dll Secondly, I have created an Assembly with TestRes.exe which is the calling application. 1. RlinkPMBAPIRes RlinkPMBAPIRes...
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
1
by: spencermiles | last post by:
Hello, I'm working on a large solution, comprised on numerous Projects, and I would like to have one central projects that contains a set of global RESX Resources. It doesn't make sense to have...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
1
by: dkunha | last post by:
I have an resources only assembly. string1 = Resources.Resource1.String1 string2 = Resources.Resource1.String2 image1 = Resources.Resource1.Image1 But using this assembly in another...
0
by: =?Utf-8?B?TWF0dE0=?= | last post by:
I'm trying to figure out if it's possible in VS2005 to get strongly typed resources using an external assembly that contains string resx files. Here are some bullets on what I'm trying to do: *...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.