Error 23 is not a valid Win32 application on .resx file

4

I have a form in my VB>NET project (2010) with some ImageList. Those images are embedded in the list with a form resource in a .resx file as

data name="xxxx.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64 When I tried to build/run my project I get:

Error 23 is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) Line XXXX, position X...

in the line where the data tag closes.

When I change the base64 code of the image inside a .resx file, (changing some '0' with 'y') the project compiles, but when I try to run the app, the images are reloaded and my changes dissapear

Do you know how to solve this error and make my project builds and runs? Thanks

.net
vb.net
resources
imagelist
win32exception
asked on Stack Overflow May 26, 2011 by Gabriel Mendez • edited Jun 2, 2011 by Bill the Lizard

2 Answers

4

if the first line of your has vbj00L near the end, replace it with vbj0yL - this will fix your problem. You will need to do this any time you modify the form from the designer.

answered on Stack Overflow Aug 16, 2011 by Corey Morasch
0

news from results of a MS support ticket.

1.This is a known issue in dotnet frameworks through 4.0. It is fixed in 4.5. http://blogs.msdn.com/b/visualstudio/archive/2010/06/18/resgen-exe-error-an-attempt-was-made-to-load-a-program-with-an-incorrect-format.aspx?PageIndex=5&CommentPosted=true#commentmessage

2.Thus, to use the 'old' 32-bit vbj00L values with a prior dotnet Target Framework, just install the 4.5 SDK. 2a.I did not need a separate install ; I just installed Visual Studio VS2012 which installed 4.5 for me. 2b.After the 4.5 is on the machine, Resgen.exe, the shared component, is available to other studio's and frameworks, eg VS2010/net3.5. Compilation will succeed.

3.As far as why the bug occurred I assume it has to do with the problem of integer representations.

answered on Stack Overflow Apr 3, 2013 by AnneTheAgile

User contributions licensed under CC BY-SA 3.0