473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Resource file problem with VS2005 debugger

GT
This question has been posted before, but without any response so therefore
I'm trying once more.
I'm trying to embed .resource files into a Windows application in VS2005,
and then compile and run the program from VS2005. This does not work because
the debugger seems not find the resource files, and I keep getting the
following error:

"MissingManifestResourceException:
Could not find any resources appropriate for the specified culture (or the
neutral culture) on disk. baseName: String locationInfo: <null fileName:
String.resources"

The code does however work when using the Command Line Compiler, and
lauching the application from the command window.
What is the reason for this?
Are there some special settings in VS2005 that I'm missing?

My example code is very simple and can be tested doing the following:

1) Open a new Project in VS2005: Visual C#>Windows>Windows Application
2) Delete Form1.cs
3) Replace the Main method of Program.cs with the following code:

CultureInfo ci = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
ResourceManager rm = ResourceManager.CreateFileBasedResourceManager
("String", "de-DE", null);
Console.WriteLine(rm.GetString("wednesday", ci));

4) Add the using statements
using System.Resources;
using System.Threading;
using System.Globalization;
using System.Reflection;

5)Add a new folder "de-DE" and add a text file named 'String.de-DE.txt' to
the folder

6)Open 'String.de-DE.txt' and write 'wednesday=Mitwoch'

7)Open the VS Command Window and locate the de-DE folder. Then use
resgen.exe to generate a .resource file by writing 'resgen String.de-DE.txt'.

8) Type 'cd..'

9) Compile the solution with the Command Line Compiler writing
'csc /res:de-DE\String.de-DE.resources *.cs'

10) Run the example by typing 'Program'. This should will display 'Mitwoch'
in the command window

Now try to debug and run the application from Visual Studio 2005 (F5). This
will cause the above mentioned error. Why?

Aug 2 '06 #1
0 1456

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

Similar topics

12
by: bj7lewis | last post by:
I am working on a project I want to add a few files as resource to access(copy them to FS and use) at runtime. So far in VS.NET IDE, I Add Files to the project and set its Build Action to...
1
by: coz | last post by:
Someone please help! I cannot for the life of me get a web resource in asp.net 2.0 to return any content. I know I have correctly embedded my resources (because I can manually get the resources...
1
by: dethonlegs | last post by:
Hi, I have a small vb.net app that runs as a cgi under IIS6. When compiled under VS.NET 2003 (framework 1.1) I can launch the dubugger from IIS by adding the line...
1
by: mehdi_mousavi | last post by:
Hi folks, Consider a string that's defined under VS2005 resource editor as myField with the value of myValue. To access the value, I could easily use the Properties.Resources class, for example:...
4
by: Al Norman | last post by:
We have two separate DLLs that do not interact (directly, at least). One is an MFC extension DLL that was built back in VC++ 6 days (but has been recompiled with VS2005). The other is a DLL that...
4
by: Ismo Salonen | last post by:
I've got code that works when started normally (explorer, command whatever) but fails when started from VS2003. It crashes in different place when started with debugging (F5) and other place when...
6
by: Peted | last post by:
Hi, im wanting to store some custom text strings in the app.config file of a c# app, to be retreived and updated when the app runs. using c# 2005 express in my testing i am using the code...
9
by: Peter Hartlén | last post by:
I understand that the\n and \r only means something to the C# compiler so when retrieving a line like "Hello\r\nWorld" from a resource file (localized form or self made resource file), it prints...
8
by: raylopez99 | last post by:
I have the latest version of Visual Studio 2008 Professional, which allows you to create resource files (this is the .resx file, no?), unlike the Express version, which does not. I am trying to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.