Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1095113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:04:24+00:00 2026-05-17T00:04:24+00:00

Along with: An attempt was made to load a program with an incorrect format

  • 0

Along with: An attempt was made to load a program with an incorrect format

I have A.EXE that references B.DLL. Both are mine. Both are set to x86 for the platform target. B.DLL references:

System
System.Data
System.Windows.Forms
System.XML

I am using VS2010 on Win7 64-bit. All search results I can find say that this is because of loading 32-bit assemblies into 64-bit executables or vice versa. However I have checked and rechecked that A.EXE and B.DLL are set to use “x86” as the platform target. I’ve also tried cleaning and rebuilding the entire solution. B.DLL builds with no errors or warnings.

This is a previously working project. I’m currently working on refactoring it by moving some code out of A.EXE an into the newly-created B.DLL.

I tried setting A.EXE to “Any CPU” and it didn’t help (I didn’t expect it to). Changing it back to “x86” didn’t help either.

I am targeting .NET 3.5

Update

I created a new C# class library C.DLL and added a reference to B.DLL. C.DLL is set to x86 and it compiles fine.

Update

The compile-time error occurs in MainForm.resx at a closing “data” tag:

  <data name="StatusStripImages.ImageStream"
  mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
    ...
    </value>
  </data>

Update

I now suspect resgen.exe. I tried forcing it to be 32-bit and I broke it (see: http://social.msdn.microsoft.com/Forums/en-US/vseditorprerelease/thread/6782c692-a9b6-4930-a099-4ee4092e91a9).

Any ideas?

thanks, Andy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:04:25+00:00Added an answer on May 17, 2026 at 12:04 am

    It seems I am suffering from a bug [1] in Visual Studio 2010 that Microsoft can’t be bothered to fix even though they’ve known about it for months.

    There are three workarounds and I just changed A.EXE and B.DLL from .NET 3.5 to .NET 4.0 to solve it. Not ideal but I didn’t want to make changes to resgen.exe. I guess I have to wait for SP1 to be able to target .NET 3.5.

    [1] 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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 541k
  • Answers 540k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I found same ! try this document.getElementById('XXX').Validators[0].isvalid It's working for… May 17, 2026 at 2:46 am
  • Editorial Team
    Editorial Team added an answer Is Quiz.newQuiz a static method? If that is the case,… May 17, 2026 at 2:46 am
  • Editorial Team
    Editorial Team added an answer Turns out that there is an "add column" button that… May 17, 2026 at 2:46 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have created a grid view that displays six cells of content. In each
I have an activeX control that contains one window that has streaming video being
I have a set of RESTful web services. These services are protected on a
I have a long-running console-based application Sender that sends simple text to STDOUT using
I have a long-running console-based application Sender that sends simple text to STDOUT using
I'm building a booking engine for a car hire place. I have a Booking
I have a long-running report and want to show a wait-spinner to the user
Background I am trying to create a copy of a business object I have
I have the below SQL which works just fine: SELECT Message, CreateDate, AccountId, AlertTypeId
I'm attempting to create a client/server program, but I'm finding some difficulty continuing with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.