472,805 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 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 2397
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: *...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.