Error Generating Win32 resource.... (bug in VS.NET 2003)


N

~~~ .NET Ed ~~~

this seems like a bug to me. I use VS.NET 2003 with the framework v1.1. I
had a project that grouped all the common forms I would use in other
solutions. There are icons associated with these forms.

This week I had to reorganize my development tree, things got moved around
by prune & graft. It appears that for *some* icons the IDE uses a relative
path rather than an absolute path.

When I compile my common-forms project it fails with the following message:

"Error generating Win32 resource: Error reading icon
'E:\develop\lib\icons\relationtree.ico'-- The system cannot find the path
specified."

I looked at all the forms and don't see the missing icon. I remember one of
them used that icon, but now that the tree has been moved all the forms
display fine in design mode but does not build the project due to that
problem.

I went around removing adding the Form icons of the various forms because I
think that's where I used it. The problem still persists. The other icons in
the form display fine and are not missing so I must be one of the Form level
icons.

What I find annoying is:
a) The IDE throws the error but does not give the slightest clue as to WHICH
file uses the offending icon!
b) That it somehow remembers the "relative path" and filename of the icon
but does not appear to have that information ANYWHERE in the project
directory! I did a search on ALL the files (Find in files, *.*) for the base
name of the icon (relationtree and just that) and it cannot find it
anywhere.

So now I am stumped, can't compile my project, don't know where on earth
this stubborn IDE is getting the path and name of the icon.

Any help? this is certainly a bug, I wish it was just at least a bit
friendlier in the message, it sounds like "There is a dead person in the
city" yeah right, how helpful is that? I don't really feel like deleting the
forms one by one and recreating them all over again.
 
Ad

Advertisements

H

Herfried K. Wagner [MVP]

~~~ .NET Ed ~~~ said:
When I compile my common-forms project it fails with the
following message:

"Error generating Win32 resource: Error reading icon
'E:\develop\lib\icons\relationtree.ico'-- The system cannot find the path
specified."
[...]
b) That it somehow remembers the "relative path" and
filename of the icon but does not appear to have that information
ANYWHERE in the project directory! I did a search on ALL
the files (Find in files, *.*) for the base name of the icon
(relationtree and just that) and it cannot find it
Delete the project's "bin" and "obj" directories and try to compile again.
 
N

~~~ .NET Ed ~~~

Tried that, it does not solve the problem. I removed both the obj and bin
trees (completely), recompiled and it spit the same error back at me. Do I
hear bug?

Herfried K. Wagner said:
~~~ .NET Ed ~~~ said:
When I compile my common-forms project it fails with the
following message:

"Error generating Win32 resource: Error reading icon
'E:\develop\lib\icons\relationtree.ico'-- The system cannot find the path
specified."
[...]
b) That it somehow remembers the "relative path" and
filename of the icon but does not appear to have that information
ANYWHERE in the project directory! I did a search on ALL
the files (Find in files, *.*) for the base name of the icon
(relationtree and just that) and it cannot find it
Delete the project's "bin" and "obj" directories and try to compile again.
 
N

~~~ .NET Ed ~~~

I classify this as a VS.NET 2003 bug.... short of deleting all forms and
recreating them (very unproductive) I tried
every imaginable way to get that going, to no avail.

Ultimately what I had to do, was create another project, and move each of
the forms by hand using the Windows Explorer (one by one), then in VS.NET
adding it as an existing item. When I did that for all of them the problem
did not arise anymore.

Somehow VS.NET seems to remember things it shouldn't, the computer version
of Phantom Pain.

On a similar note, one of the user controls I moved from the "broken"
project to the new project had an extra resource file that is accessed with
the ResourceManager. Well, on the new project that control no longer works
because it cannot find the resource file. This is strange because it IS
added to the project as an Embedded Resource so it should compile it into
the assembly yet it doesn't. This looks like a bug to me as well.

Herfried K. Wagner said:
~~~ .NET Ed ~~~ said:
When I compile my common-forms project it fails with the
following message:

"Error generating Win32 resource: Error reading icon
'E:\develop\lib\icons\relationtree.ico'-- The system cannot find the path
specified."
[...]
b) That it somehow remembers the "relative path" and
filename of the icon but does not appear to have that information
ANYWHERE in the project directory! I did a search on ALL
the files (Find in files, *.*) for the base name of the icon
(relationtree and just that) and it cannot find it
Delete the project's "bin" and "obj" directories and try to compile again.
 
F

Fredrik

This error is probably caused by a invalid icon format assigned to a
project in your solution (maybe your icon has more than 256 color
which seems to be the limit?). If this is the case, you need to find
that project, open the property pages window and change the
Application icon to a icon file with 256 colors or less. Hope this
works!

/Fredrik
 
G

Guest

Check out the ProjectName.csproj file.. I had the same problem and the reference was in there.. delete it and all ok.

Cheers
this seems like a bug to me. I use VS.NET 2003 with the framework v1.1. I
had a project that grouped all the common forms I would use in other
solutions. There are icons associated with these forms.

This week I had to reorganize my development tree, things got moved around
by prune & graft. It appears that for *some* icons the IDE uses a relative
path rather than an absolute path.

When I compile my common-forms project it fails with the following message:

"Error generating Win32 resource: Error reading icon
'E:\develop\lib\icons\relationtree.ico'-- The system cannot find the path
specified."

I looked at all the forms and don't see the missing icon. I remember one of
them used that icon, but now that the tree has been moved all the forms
display fine in design mode but does not build the project due to that
problem.

I went around removing adding the Form icons of the various forms because I
think that's where I used it. The problem still persists. The other icons in
the form display fine and are not missing so I must be one of the Form level
icons.

What I find annoying is:
a) The IDE throws the error but does not give the slightest clue as to WHICH
file uses the offending icon!
b) That it somehow remembers the "relative path" and filename of the icon
but does not appear to have that information ANYWHERE in the project
directory! I did a search on ALL the files (Find in files, *.*) for the base
name of the icon (relationtree and just that) and it cannot find it
anywhere.

So now I am stumped, can't compile my project, don't know where on earth
this stubborn IDE is getting the path and name of the icon.

Any help? this is certainly a bug, I wish it was just at least a bit
friendlier in the message, it sounds like "There is a dead person in the
city" yeah right, how helpful is that? I don't really feel like deleting the
forms one by one and recreating them all over again.
User submitted from AEWNET (http://www.aewnet.com/)
 
Ad

Advertisements

Joined
Aug 28, 2012
Messages
10
Reaction score
0
Thanks for a clue! You save my life/time :bow:

Check out the ProjectName.csproj file.. I had the same problem and the reference was in there.. delete it and all ok.

Cheers

> this seems like a bug to me. I use VS.NET 2003 with the framework v1.1. I
> had a project that grouped all the common forms I would use in other
> solutions. There are icons associated with these forms.
>
> This week I had to reorganize my development tree, things got moved around
> by prune & graft. It appears that for *some* icons the IDE uses a relative
> path rather than an absolute path.
>
> When I compile my common-forms project it fails with the following message:
>
> "Error generating Win32 resource: Error reading icon
> 'E:\develop\lib\icons\relationtree.ico'-- The system cannot find the path
> specified."
>
> I looked at all the forms and don't see the missing icon. I remember one of
> them used that icon, but now that the tree has been moved all the forms
> display fine in design mode but does not build the project due to that
> problem.
>
> I went around removing adding the Form icons of the various forms because I
> think that's where I used it. The problem still persists. The other icons in
> the form display fine and are not missing so I must be one of the Form level
> icons.
>
> What I find annoying is:
> a) The IDE throws the error but does not give the slightest clue as to WHICH
> file uses the offending icon!
> b) That it somehow remembers the "relative path" and filename of the icon
> but does not appear to have that information ANYWHERE in the project
> directory! I did a search on ALL the files (Find in files, *.*) for the base
> name of the icon (relationtree and just that) and it cannot find it
> anywhere.
>
> So now I am stumped, can't compile my project, don't know where on earth
> this stubborn IDE is getting the path and name of the icon.
>
> Any help? this is certainly a bug, I wish it was just at least a bit
> friendlier in the message, it sounds like "There is a dead person in the
> city" yeah right, how helpful is that? I don't really feel like deleting the
> forms one by one and recreating them all over again.
>
>


User submitted from AEWNET (http://www.aewnet.com/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top