473,832 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A problem with resources file.

Hi,

What I need to do is adding some support for resources files to my
application. What I did is:
MyAppMain <- startup project
MyAppHelper <- project which has MyAppResourcesC lass (al a library project)
This class call methode :
ResourceManager MyAppResourceMa nager = new
ResourceManager ("MyAppMain.Res ources", Assembly.GetExe cutingAssembly( ));
and I obtain error which tell that there is no propertly added
MyAppMainResour ces resource file / collection to this MyAppHelper set.

What I did, is to add resources file to MyAppMain project (I thought adding
file Resources.resx to this project will be enought), but no... so I go
further to making file Resource.resour ces.dll by resgen & al utilities, then
I tray to set /embed:Resources .resources,MyAp pMain.Resources .resources, and
for embed:Resources .resources,MyAp pHelper.Resourc es.resources - for the
second setting I reedit ResourceManager ("MyAppHelper.R esources) ... and I
did a lot of these things. All with culture set to

private static CultureInfo QServiceCulture Info = new CultureInfo("") , which
should give me invariant culture or call embedded resources (?). I try to
set culture to en-GB and make files in en-GB folder (these dll's) and then
call them form the MyAppMain ("MyAppMain.Res ources) and ResourceManager
created there is working perfectly (oposite, I still cant put one
Resources.resx in project and forget about it.

So what I should do to obtain situation when I still have one resource file
embeded in my project, which should be accessable by Helper class ? How the
ResourceManager should be inicialized ?

--

best regards

stic

Nov 16 '05 #1
1 2298

Użytkownik "Stefan Turalski (stic)" <st************ *@kruk-inkaso.com.pl>
napisał w wiadomo¶ci news:uE******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

What I need to do is adding some support for resources files to my
application. What I did is:
MyAppMain <- startup project
MyAppHelper <- project which has MyAppResourcesC lass (al a library project) This class call methode :
ResourceManager MyAppResourceMa nager = new
ResourceManager ("MyAppMain.Res ources", Assembly.GetExe cutingAssembly( ));
and I obtain error which tell that there is no propertly added
MyAppMainResour ces resource file / collection to this MyAppHelper set.

What I did, is to add resources file to MyAppMain project (I thought adding file Resources.resx to this project will be enought), but no... so I go
further to making file Resource.resour ces.dll by resgen & al utilities, then I tray to set /embed:Resources .resources,MyAp pMain.Resources .resources, and for embed:Resources .resources,MyAp pHelper.Resourc es.resources - for the
second setting I reedit ResourceManager ("MyAppHelper.R esources) ... and I
did a lot of these things. All with culture set to

private static CultureInfo QServiceCulture Info = new CultureInfo("") , which should give me invariant culture or call embedded resources (?). I try to
set culture to en-GB and make files in en-GB folder (these dll's) and then
call them form the MyAppMain ("MyAppMain.Res ources) and ResourceManager
created there is working perfectly (oposite, I still cant put one
Resources.resx in project and forget about it.

So what I should do to obtain situation when I still have one resource file embeded in my project, which should be accessable by Helper class ? How the ResourceManager should be inicialized ?

--

best regards

stic


Ok, what I have done is:
1. Make this resource file in another location (not added to project)
2. by resgen I obtain for example en-GB Resource.en-GB.resources form
Resources.en-GB.resx
3. by al, I embeded this to dll,
al /t:lib
/embed:Resources .en-GB.reources,MyN amespace.MyAppH elper.Resources .en-GB.reso
urce /culture:en-GB /out:Resources.r esources.dll
4. I put this file to a new childe folder en-GB, in folder of my debug
folder
5. in ResourceManager , i gave as a parametr
"MyNamespace.My AppHelper.Resou rces", and for every for exmaple GetString I
use CultureInfo("en-GB");

and this works ;-)

What is gave me fun - it will be also work if I set culture for (for
example) de-DE, or for "" - strange things - today I'm not going to try
adding another resource file for other culture and conect this files for
specific CultureInfo but I'm ready for next hard questions...

If anybody could told me which step I should do (and I jumped over) please -
it coulde be so hard to deploy multi-resources applications..

--
best regards & have a nice week
stic
Nov 16 '05 #2

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

Similar topics

0
1594
by: Cedric | last post by:
I have a WebPage with a usercontrol (webcomponent.dll). With the port 80 on the server, the webpage and the usercontrol works fine If i change the port (18802), the time of loading the usercontrol is very long. After 30secondes it works fine With the tool "Assembly Binding Log Viewer" (FUSLOGVW), i see that the CLR search the assembly mscorlib.ressource on the server not at the port 18802 but at the port 80 This call are very long because...
0
3339
by: Markus Poehler | last post by:
Hi my program should run on terminal server. I open Acrobat process and I have to kill them at some points in my application. This fails cause of insufficient rights on terminal server. the lines: Dim p As New Process For Each p In Process.GetProcesses If LCase(p.ProcessName) = "acrord32" Then 'p.Kill()
7
1759
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
4
5899
by: Jon Rista | last post by:
I have a project where I need to create a windows .exe by compiling code and linking in some resources. This program thats being generated is somewhat unconventional, and I'll explain how. I'm generating a very simple installer app that embeds referenced .dll files inside it, which are extracted and referenced when the installer app is executed. This works great when the installer app is built with Visual Studio .NET, but it does not work...
0
2203
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...
2
1533
by: fabrice | last post by:
hello, I nedd help to create and use Library Satellite. I'm using Web Form under framework 1.1 and VB.NET I'm not using Visual Studio. I'd like to internationalize my web application with using .DLL For the moment i test many solutions with one .aspx page to create a model. But i'm not.
0
9172
by: Rob Dob | last post by:
Hi, I have a VS2003 C# asp.net project that has been converted into a VS2005 project. Everything seemed to work well until I make a modification to anything within the Component Designer window, i.e. I add a SQLCommand. At that point VS2005 changes my C# file to now load all Selectcommantext data from the resource file instead of the .aspx.cs file. then when I try and once again run my application I get the following error: looking...
0
1767
by: Fabrice | last post by:
Hello, (Alain) Tis is a part of my code to retrieve text from hastable in memory cache, by reading (befor) a resources file. Thanks for your help. /1/ The resources file * I have create a .TXT file with Keys/Values
3
4965
by: =?Utf-8?B?TWljaGFlbCBIYWJlcmljaHRlcg==?= | last post by:
Hallo, I have a problem with a MissingManifestResourceException. I'm trying by days without finding any solution. Shortly the context: I have a .Net application (APPL_1), which does the following: - purpose: generate resources file in Online dialog for a VS 2005 project - gets as parameter the base-directory of another Application. (Here: a VS 2005 Project APPL_2.exe)
0
9795
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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
10498
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
10540
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,...
1
7753
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
6951
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();...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4421
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
3
3077
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.