473,698 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resource file in class library

Hi,
I have got a C# Class library project 'MyCompany.Mode l.ValidationSer vice'
that deals with
data validation. In this I have got a resource file 'RegularExpress ions' to
store regular
expressions for email, tel no, SSN etc. Below is the code and associated
error message

Line1: ValidationResul tList validationResul tList = new
ValidationResul tList();
Line2: ResourceManager rm = new ResourceManager ("RegularExpres sions",
this.GetType(). Assembly);
Line3: string t= rm.GetString("T esting"); //throws error

Error message is:Could not find any resources appropriate for the specified
culture or the neutral culture. Make sure "RegularExpress ions.resources"
was correctly embedded or linked into assembly "MyCompany.Mode l" at compile
time, or that all the satellite assemblies required are loadable and fully
signed.

I cant figure out what I am doing wrong, if it has trouble with locating or
loading the resource file then why doesnt line 2 throws error in the first
place.

Thanks.
-Sami
Mar 12 '07 #1
0 1422

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

Similar topics

3
2759
by: Chua Wen Ching | last post by:
Hi there, I had applied this security permissions in my class library based on fxcop standards. Before namespace: using System.Runtime.InteropServices; using System.Security.Permissions;
3
10374
by: J.Marsch | last post by:
Hello all: I am trying to build a resource dll that will house icons, and I'm afraid that I'm not having much luck reading it. Can you lend hand (or just point me to a good primer). Here's what I've done so far: (VS.NET 2003/C#) 1. Created an empty project for the resource dll. Output type is class library.
0
1888
by: WebDevHokie | last post by:
Good day, I have a class library that I am creating and I want to use a resource file for each of the classes in the library. So I created a resource file (DataAccessLayer.resx) for each class (done from the Visual Studio IDE) and I then put the following code in my classes: ResourceManager o_ResourceManager = new ResourceManager("DataAccessLayer", Assembly.GetExecutingAssembly());
3
3335
by: al | last post by:
Hi, I use a resource file (.resx) to store user's settings such as language and other strings. The problem i'm facing is that when the user changes one of the strings in the resource file, those changes are shown by VB.NET untill after the user reloads the app. Is there any work-around for this behavior so changes can appear without relaoding the app??
2
6214
by: Al | last post by:
Hi, I have created a solution with two projects in it - a class library and a windows forms front end. I have added a resource file (Resources.resx) to the class library and filled it with icons. Does anybody know how would I go about using an icon from this resource file in the windows forms project? Thanks in advance, Al.
0
6606
by: Herman Jones | last post by:
I'm getting the following error when I build a Class Library project: Embedding manifest... Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'. It happens with every the of C++ project I try to build. Not just Class Libraries, but a plain Windows Form Application as well. I've tried creating new projects with nothing but shell built by the Wizard, but I still get the error.
8
12074
by: John Dunn | last post by:
Since currently we aren't allowed to have compiled XAML files embedded in C++ apps I'm using Markup::XamlReader::Load to dynamically load XAML files. This works perfectly fine with external files but I'd like to be able to load a file specified in a .resx resource. I've added my .xaml file to the .resx and can load it in using ResourceManager::GetObject(). The object returned is a System::Array^ which contains System::Byte objects. The...
1
15710
by: Steve Richter | last post by:
I am embedding an xml file in my class library assembly. In solution explorer I right click a folder, add , new item, xml file. then on the xml file I right click, properties, build action = embedded resource. build the class library, run the following code to access the XML as a stream: Stream cmdsStream =
12
5266
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
8683
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
8610
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
9031
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
8902
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
7740
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
6528
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
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
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.