472,341 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Compiler won't include resources for all forms

In an app that was working, all I did was specify an icon for the main
form (through the form designer) and recompile it.

Result: MissingManifestResourceException

After digging around, I found that the compiler generates .resource
files in the debug build of the application, for all forms except the
main one (form1).

The .resx file (with the icon in it) exists in the source directory,
and in the project file it's specified as for "embedded resource" type
compilation, but the compiler still seems to ignore it.

Does anyone have an idea what might cause this?
Cut & paste from the .vbproj file:

RelPath = "Form1.vb"
SubType = "Form"
BuildAction = "Compile"
RelPath = "Form1.resx"
DependentUpon = "Form1.vb"
BuildAction = "EmbeddedResource"

There's no difference between this and similar sections for other
three forms.

Files in the ./obj/debug directory after a full recompile:

<DIR> temp
<DIR> TempPE
In the InitializeComponent function, this line fails (single line in
the source):

Me.Icon = CType(resources.GetObject("$this.Icon"),

Resources are opened at the start of that function as (single line):

Dim resources As System.Resources.ResourceManager
= New System.Resources.ResourceManager(GetType(Form1))

The icon is present in form1.resx, named $this.Icon and culture

Nov 20 '05 #1
1 1132
On Tue, 27 Apr 2004 18:09:56 +0200, Lucvdv <re**********@null.net>
In an app that was working, all I did was specify an icon for the main
form (through the form designer) and recompile it.

Result: MissingManifestResourceException

Sorry, for asking, and here's the solution (I found previous questions
about the same problem, so maybe I'm helping someone):

I had included a small auxiliary class by just inserting the 7 (seven)
lines that define it at the start of Form1.vb.

That was it: all I had to do was move it to a separate source file.
Now Form1.resources is created at compile time, and the application no
longer crashes at startup.
Nov 20 '05 #2

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

Similar topics

by: Nikola Skoric | last post by:
Is the a PHP compiler? A program that compiles PHP code to executable which doesn't need php interpreter to execute... -- Pozdrav/Regards,...
by: Neil Zanella | last post by:
Hello, I wonder whether anyone has ever come across the following g++ compiler error message. I don't recall ever seeing it before. I solved my...
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then...
by: Richard | last post by:
Hi All, I am using Visual C++ .Net to create a windows forms application and I am getting the following errors when I do a MessageBox::Show in my...
by: taylorjonl | last post by:
I am completely baffled. I am writting a daemon application for my work to save me some time. The application works fine at my home but won't...
by: Stuart Carnie | last post by:
I suspect it's unlikely, but you'll never know until you ask, but are there any attributes that would allow us to contribute to the compiled output?...
by: wkaras | last post by:
I've compiled this code: const int x0 = 10; const int x1 = 20; const int x2 = 30; int x = { x2, x0, x1 }; struct Y {
by: Anonymous | last post by:
My code has suddenly stopped compiling after some refactoring I carried out last week. I am using VC8 on W2K professional I get the following...
by: Alejandro Gaio | last post by:
Hello All, I have a problem that appeared with the NEW VERSION of the vb.net compiler (VS 2008). To resume things, I have a project (call it...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.