471,350 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

System.Resources.MissingManifestResourceException

I'm trying to use an ImageComboBox in my app. The control worked fine in a
demo app, but the contructor throws a
System.Resources.MissingManifestResourceException with the text:

"Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure
\"TreeViewContainer.resources\" was correctly embedded or linked into
assembly \"ImageComboBox\".\r\nbaseName: TreeViewContainer locationInfo:
TSC.UserInterface.ExtendedComponents.ImageComboBox .TreeViewContainer resource
file name: TreeViewContainer.resources assembly: ImageComboBox,
Version=1.0.2153.16846, Culture=neutral, PublicKeyToken=null"

I commented out the few lines where I was changing the culture to geta
different default timestamp format, and am using nuetral culture exclusively
throughout my app so I'm not sure what the problem is.

With experimentation it seems that the moving of the source from
solution\project\ to solution\project\src\ or the changing of the namespace
from the provided default to one fitting our apps hierarchy will cause the
exception to be thrown.

Custom control:
http://www.codeproject.com/cs/miscct...sp#xx1245940xx

Nov 28 '05 #1
2 6282


"Dan Neely" wrote:
I'm trying to use an ImageComboBox in my app. The control worked fine in a
demo app, but the contructor throws a
System.Resources.MissingManifestResourceException with the text:


More info. The exception is being thrown while attempting to load the image
list in InitializeComponents() The second line of the codeblock is
exceptional.

this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resource s.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
Nov 28 '05 #2
Hi,

I'm having the same problem (but in VB.NET).

I studied the problem a little bit further. For some reason, the .resource
files that get generated / embedded in the assembly have a wrong name. Also,
the problem occurs only for some projects. I have several projects that work
just fine, but one problematic class library. I tried creating the project
again from scratch using the existing source code files - no luck.

If you use reflector and check your resources, you should see
"Namespace.MyClass.resource", but when it's bugging, the resource file is
named "MyClass.resource". The same thing can be seen from the obj folder
under the project folder.

How does the VS.NET2005 determine the names of the resource files? I found
this:

http://support.microsoft.com/default...;EN-US;Q318603

but it discusses VS.NET2003 and none of my code files have anything between
the namespace and the class declaration. And my VS.NET2003 is clearly
different from the one discussed in the workaround...

- Product review next week...
Jan 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Ken Allen | last post: by
2 posts views Thread by bob | last post: by
1 post views Thread by Franklin M. Gauer III | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.