Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / December 2003

Tip: Looking for answers? Try searching our database.

using resources help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeremy Chapman - 09 Dec 2003 21:06 GMT
I've added a resource file (myresource.resx) to my project (myproject)

opening the resx file gives me a list of data tables (data and resheader)
in the data, I've added two rows containing strings.

now, I'm trying to use those resources but I get the error
Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure
"InteriorHealth.Web.resources" was correctly embedded or linked into
assembly "InteriorHealth.Web". baseName: InteriorHealth.Web locationInfo:
<null> resource file name: InteriorHealth.Web.resources assembly:
InteriorHealth.Web, Version=1.0.1438.21496, Culture=neutral,
PublicKeyToken=null
here is my code:
Assembly asm = Assembly.GetExecutingAssembly();

//Assembly.GetCallingAssembly();

AssemblyName asmName = asm.GetName();

pResMan_m = new ResourceManager(asmName.Name, asm);

string strvalue = pResMan_m.GetString("myresource");
Dmitriy Lapshin [C# / .NET MVP] - 15 Dec 2003 13:23 GMT
Hi Jeremy,

Use the ILDASM tool to find out the real name of the embedded resource file.
This name can be found in the assembly's manifest.

Signature

Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

> I've added a resource file (myresource.resx) to my project (myproject)
>
[quoted text clipped - 19 lines]
>
> string strvalue = pResMan_m.GetString("myresource");

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.