473,386 Members | 1,610 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,386 software developers and data experts.

including resource files

guy
vb2005
i have a resource file (MyFile.resources) created using resgen.
how do i inculde it within my assembly? i have tried adding it to my project
but it does not get built into the exe, so i get a
MissingManifestResourceException when trying to use resources within it.

any ideas?

Mar 14 '06 #1
5 1129
"guy" <gu*@discussions.microsoft.com> schrieb
vb2005
i have a resource file (MyFile.resources) created using resgen.
how do i inculde it within my assembly? i have tried adding it to my
project but it does not get built into the exe, so i get a
MissingManifestResourceException when trying to use resources within
it.

any ideas?

Select the file in the solution explorer. In the property window, did you
set the "build action" to embedded resource?
Or, maybe you misspelled the resource name. Try this at application startup
to see the embedded resources:

MsgBox(String.Join(vbCrLf, _
System.Reflection.Assembly.GetExecutingAssembly.Ge tManifestResourceNames _
))

Armin

Mar 14 '06 #2
guy
thanks Armin,
yes it has Build Action set to Embedded Resource.
looking at it witl ILDasm does not show the resource, nor does
GetMainfestResourceNames in your example - i must be doing something else
wrong!


"Armin Zingler" wrote:
"guy" <gu*@discussions.microsoft.com> schrieb
vb2005
i have a resource file (MyFile.resources) created using resgen.
how do i inculde it within my assembly? i have tried adding it to my
project but it does not get built into the exe, so i get a
MissingManifestResourceException when trying to use resources within
it.

any ideas?

Select the file in the solution explorer. In the property window, did you
set the "build action" to embedded resource?
Or, maybe you misspelled the resource name. Try this at application startup
to see the embedded resources:

MsgBox(String.Join(vbCrLf, _
System.Reflection.Assembly.GetExecutingAssembly.Ge tManifestResourceNames _
))

Armin

Mar 14 '06 #3
"guy" <gu*@discussions.microsoft.com> schrieb
thanks Armin,
yes it has Build Action set to Embedded Resource.
looking at it witl ILDasm does not show the resource, nor does
GetMainfestResourceNames in your example - i must be doing something
else wrong!

Hmm.. strange. I tried the same now: I used "reseditor.exe" (from the
samples), added one bitmap, saved as "test.resources", added the file to the
project ("embedded resource" is set by default) and built the exe.
GetManifestResourceNames returns
WindowsApplication1.Form1.resources
WindowsApplication1.test.resources
WindowsApplication1.Resources.resources

where "test.resources" is the embedded file.

I currently have no clue what's going wrong in your project.... I'll let you
know if something comes into my mind.

Armin

Mar 14 '06 #4
guy
Armin, a power off/on fixed this (it makes you wonder...)

thanks

guy

"Armin Zingler" wrote:
"guy" <gu*@discussions.microsoft.com> schrieb
thanks Armin,
yes it has Build Action set to Embedded Resource.
looking at it witl ILDasm does not show the resource, nor does
GetMainfestResourceNames in your example - i must be doing something
else wrong!

Hmm.. strange. I tried the same now: I used "reseditor.exe" (from the
samples), added one bitmap, saved as "test.resources", added the file to the
project ("embedded resource" is set by default) and built the exe.
GetManifestResourceNames returns
WindowsApplication1.Form1.resources
WindowsApplication1.test.resources
WindowsApplication1.Resources.resources

where "test.resources" is the embedded file.

I currently have no clue what's going wrong in your project.... I'll let you
know if something comes into my mind.

Armin

Mar 15 '06 #5
"guy" <gu*@discussions.microsoft.com> schrieb
Armin, a power off/on fixed this (it makes you wonder...)

thanks

guy


Never wonder. :)
Armin

Mar 15 '06 #6

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

Similar topics

1
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ...
0
by: Kleanthis | last post by:
I have a problem, when deploying multilingual applications using cab files on Compact Framework 2.0. It seems that something is going wrong with compact framework 2.0 Below I have a description...
1
by: urban.john | last post by:
Here are my steps: create resource files from resx files: <echo message="CREATING RESOURCE FILES FROM RESGEN EN" /> <resgen todir="product\resources_en" verbose="true"> <resources> <include...
1
by: Tom | last post by:
This may seem a little strange, but in all my years of developing Windows Forms apps, I've never really used Resource files; however, I would like to start doing so in order to store icons,...
7
by: craig | last post by:
....quick question for anyone who might have some experience with .net resource files in VS 2003. I have an application that is not localized, but I would still like to be able to place all of...
12
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
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. ...
1
by: TisMe | last post by:
Hi All, I am trying to use resource files to globalize my website application. I had this working fine, working through the API for setting page titles programatically, with the resource files...
11
by: bhaughey | last post by:
Hi, I'm a bit lost as to how to actually include additional resource files in my project... I have a .pdf file I would like the end user to be able to access as a help file, it all works ok,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.