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:

<File
RelPath = "Form1.vb"
SubType = "Form"
BuildAction = "Compile"
/>
<File
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:

App.exe
App.Form2.resources
App.Form3.resources
App.Form4.resources
App.pdb
<DIR> temp
<DIR> TempPE
In the InitializeComponent function, this line fails (single line in
the source):

Me.Icon = CType(resources.GetObject("$this.Icon"),
System.Drawing.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
neutral.

Nov 20 '05 #1
1 1132
On Tue, 27 Apr 2004 18:09:56 +0200, Lucvdv <re**********@null.net>
wrote:
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

34
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,...
13
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...
1
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...
4
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...
5
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...
5
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?...
5
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 {
1
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...
0
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...
0
better678
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...
0
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...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
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...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
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. ...
2
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...
0
hi
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...
0
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.