473,385 Members | 2,243 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,385 software developers and data experts.

Embedded resources and extended namespaces

Hi there!

I did not know, where this topic fits in, so I put it here.

I have a minor problem with embedded resources, which puzzles me quite a
lot. I'd be glad if anyone can help me on this:

I've added a few files (images) to an assembly as embedded resources.
Within the project folder these files are in a subfolder named "images".

Now while trying to access them I expected to get them this way:
RootNameSpace.NameOfSubfolder.FileName
i.e.:
NameSpaceOfMyProject.Images.MyImage.jpg

This is how it is explained in here:
Understanding Embedded Resources in Visual Studio .NET
http://www.codeproject.com/dotnet/embeddedresources.asp
But what I experience under VB.NET, ist that it is not possible to organize
embedded resources this way - meaning: the name space won't extend by the
name of the subfolder.

It's just this way:
RootNameSpace.FileName
i.e.:
NameSpaceOfMyProject.MyImage.jpg

This behavoir fits more to what is discribed this article:
How to Embed Resource Files in .NET Assemblies (cont'd)
http://www.devx.com/dotnet/Article/10831/0/page/2

Ok, so far you'd might think, that one of the authors is wrong.
But the answer is: No, they both seem to be right!

I have downloaded and tried a C#-example from Eric Woodroff:
A Resource Server Handler Class For Custom Controls
http://www.codeproject.com/useritems...edded%7Cresour
ce

As you can see there, the namespace extends, as expected first.

This drives me nuts!!!
*bangingheadtowall*
;-)

Is there a difference how VB.NET and C# handle embedded Resources?
Did I forget to configuere something?
Did I misunderstand something?

Please help me - otherwise I go crazy and won't come back!! ;-)

Thanx!

Philipp Seidel

(P.S.: Actually this is kind of a crossposting. I posted this subject last
week in microsoft.public.dotnet.framework.aspnet.buildingc ontrols and was
probably kind of offtopic there, since no one answered. Sorry for that!)


Jul 19 '05 #1
1 3108
I'm just too stupid!!!!!
Sorry!!!

Philipp Seidel
(the one who goes hiding in the cellar now)
Jul 19 '05 #2

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

Similar topics

0
by: Philipp Seidel | last post by:
Hi there! I did not know, where this topic fits in, so I put it here. I have a minor problem with embedded resources, which puzzles me quite a lot. I'd be glad if anyone can help me on this: ...
5
by: Drew | last post by:
Assembly asm = Assembly.GetExecutingAssembly(); me = new Bitmap(asm.GetManifestResourceStream("me.gif")); I have used this before without any problem, but now I get: An unhandled exception...
0
by: Chris Schremser | last post by:
I have a question regarding embedded controls in IE. We are looking to replace a small VB ActiveX control with something written in C#. We have written the control and it instantiates correctly...
2
by: Kyle Kaitan | last post by:
I have an assembly (AppResources.dll) which contains a number of embedded resource files. Most of these are key/value pairs of relevant strings; a few are images and sounds; some more are XML...
1
by: richlm | last post by:
If I embed a resource with filename "test_cs.xslt" in my c# project, Assembly.GetExecutingAssembly.GetManifestResourceNames works as expected. If I change the filename to "test.cs.xslt" I get 0...
7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
4
by: Jon Rista | last post by:
I have a project where I need to create a windows .exe by compiling code and linking in some resources. This program thats being generated is somewhat unconventional, and I'll explain how. I'm...
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
4
by: Jason Pettys | last post by:
In an ASP.NET project I am setting the content type of my .ascx and ..aspx files to Embedded Resource for a separate reason. When I do this they get embedded as "RootNamespace.Filename" but I...
3
by: Patrick | last post by:
Hello All, I'm getting into nHibernate for a project at work. I've organized my xml files into a folder within the project and have chosen to embed them into the assembly. However, the nHIbernate...
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:
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
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
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?
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...
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...

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.