473,608 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:

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

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>Wind ows Application
2) Delete Form1.cs
3) Replace the Main method of Program.cs with the following code:

CultureInfo ci = new CultureInfo("de-DE");
Thread.CurrentT hread.CurrentCu lture = new CultureInfo("de-DE");
Thread.CurrentT hread.CurrentUI Culture = new CultureInfo("de-DE");
ResourceManager rm = ResourceManager .CreateFileBase dResourceManage r
("String", "de-DE", null);
Console.WriteLi ne(rm.GetString ("wednesday" , ci));

4) Add the using statements
using System.Resource s;
using System.Threadin g;
using System.Globaliz ation;
using System.Reflecti on;

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=Mitw och'

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 1470

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

Similar topics

12
2044
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 Embedded Resource... Now where should look next... Any help...
1
2246
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 from my assemblies at runtime.) The URLs I get back are valid (they throw no errors) but they return zero content. I get a broken page from text/html resources and broken images, etc. I can get an error if I use an invalid resource name, so I...
1
1299
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 "System.Diagnostics.Debugger.Launch" in my code. However under VS.NET 2005 (framework 2.0) the same application ignores any attempt to launch the debugger when run from IIS. In addition, there are many security permission issues that are causing me greif that were not an...
1
2514
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: global::myNameSpace.Properties.Resources.myField However, I would like to retreive it's string representation of the field's name, i.e., the "myField". How am I supposed to do that?
4
5794
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 contains .Net functions wrapped in C++ (as described by Paul DiLascia -- see http://msdn.microsoft.com/msdnmag/issues/06/06/CAtWork/default.aspx). Both DLLs specify 'Use MFC in a shared DLL'. Since we have an old VC 6 application (large) that we...
4
1518
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 started without debugging ( CTRL+F5). The same code works correctly on W2K/W2K3/XP. All modules are C++ code. The Visual Studio 2003 must be currently used due to 3rd party libraries. It has the SP1 installed.
6
2898
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 bellow, and its almost idenictal to every web example i have found. They all suggest the values and file can be read from and updated. The code bellow runs, with no errors of
9
9376
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 the text as just like it was written. Is there any easy way to introduce a newline (tab etc.) into a string retrieved from a resource file? Or should I create a resource string for each line? Thanks,
8
14932
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 cut and paste code that MSDN recommends for playing a simple wav file from inside an embedded file, like presumeably the 'resources' file .resx is. I want to embed the .wav file in a 'resource file' since I don't want the user storing the file on...
0
7987
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
8464
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
8130
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
8324
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6805
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
6000
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...
1
2464
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
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1318
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.