473,756 Members | 3,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 InternalsVisibl eTo 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 2437
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("Reso urceFile","Reso urcesId") %>

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.goog legroups.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 InternalsVisibl eTo 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
1624
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 namespace consume any resources? The template is going to be used by many people who will modify it to their use now, later when we roll out a new feature which will consume that namespace, they will 1. be set to go if we include the reference to...
1
2871
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 /embed:resourceString.fr-ca.resources, /culture:fr-ca /out:Example2.resources.dll C:\WINNT\MICROS~1.NET\Framework\v1.1.4322\Al /t:lib /embed:resourceString.resources, /out:Example2.resources.dll
7
1757
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 SDK sub-directory, as instructed by the MSDN. Step 2: I used the 'reseditor' to create a file named "MyResources.resources" that contains only some string resources. Step 3: I added this resource file to my existing test assembly (does not do
0
6142
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 --MyResources.en-US.resx ---->obj
0
2198
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 multiple web forms. When you compile the application, it creates a DLL. If you view this DLL using ILDASM (the manifest), it shows info about the resources stored in the DLL. There is essentially an embedded resource "section" for each web form. The...
1
3206
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 various resources (strings, images, etc...) scattered through the application; having them all in one central area will be a huge boon. The problem that I'm running into is being able to access these resources from external assemblies. I have...
0
3668
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 delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET. · When was the first version of .NET released? The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on...
1
2908
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 project I can't get to them because these properties are private.
0
1315
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: * I want to manage common strings in a resx file that is in a separate project from my web application. * I want to be able to use strongly type names in the web app to refer to the external resx file values * I want to be able to update the data...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9872
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9843
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.