.resx problem in VB.NET 2010

Topics: General, Windows Forms
Nov 28, 2010 at 12:31 AM

When I start the project in VB.NET I get this error in Form.resx file:

Could not load file or assembly 'file:///C:/Project1/GMap.NET.WindowsForms/GMap.NET.Core.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Line 126, position 5.

Here's that line:

<data name="GMapControl1.Position" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFBHTWFwLk5FVC5Db3JlLCBWZXJzaW9uPTEuNS40LjMsIEN1bHR1
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg1YjkwMjdiNjE0YWZlZgUBAAAAFEdNYXAuTkVULlBv
aW50TGF0TG5nAgAAAANsYXQDbG5nAAAGBgIAAAAAAAAAAAAAAAAAAAAAAAAACw==
</value>
</data>

If I delete it the project starts ok, but if I change something on the form in design mode it gets regenerated.

I am using VB.NET 2010, targeting x86 CPU and .NET 2.0.

Any ideas?

Nov 28, 2010 at 3:27 AM

Tried this on 32-bit OS and it works correctly. I wonder if it has something to do with my 64-bit Win 7?

Nov 28, 2010 at 4:36 AM

Changed target framework to 4.0 and it works. No idea why

Googled a bit:

http://blogs.msdn.com/b/visualstudio/archive/2010/06/19/resgen-exe-error-an-attempt-was-made-to-load-a-program-with-an-incorrect-format.aspx

http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/e5900710-9849-4d10-aa28-48b734d06bf2

Coordinator
Nov 28, 2010 at 11:58 AM

hm.. interesting