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

  • SEARCH
  • Home
  • 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 6147955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:11:38+00:00 2026-05-23T19:11:38+00:00

I converted my visual studio solution from 2008 to 2010. A project has a

  • 0

I converted my visual studio solution from 2008 to 2010. A project has a reference to ShDocVw. When I run the program I get a BadImageFormatException. Googling led me to check the interop library with corflags:

corflags Interop.ShDocVw.dll

Version   : v2.0.50727 
CLR Header: 2.5
PE        : PE32
CorFlags  : 3
ILONLY    : 1
32BIT     : 1
Signed    : 0

Sure enough, the 32BIT flag is set so my application built as Any CPU on 64-bit machine cannot load this library. If I run corflags /32BIT- I can turn off the 32BIT flag and everything works just fine. The question is, why is this Interop library generated with that flag set? I didn’t have that problem with VS2008, this only started happening after the upgrade.

More importantly, how can I fix it so that I don’t have to run corflags to turn the bit off? I assume that it is probably due to some MSBuild-fu that I don’t understand very well. I haven’t been able to spot anything, anyway.

  • 1 1 Answer
  • 2 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-23T19:11:39+00:00Added an answer on May 23, 2026 at 7:11 pm

    The problem is that after the upgrade the <PlatformTarget> tag is not set in certain <PropertyGroups> in the C# project files and it apparently defaults to x86. So, to fix this go to the project Properties -> Build tab and set Platform Target to something other than AnyCPU, save it. Now set it back to AnyCPU and save it. The <PlatformTarget> will be written to the project with the value of AnyCPU and all is well.

    Here is where I found the answer.

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

Sidebar

Related Questions

I recently converted my solution from Visual Studio 2008 to 2010, hoping I would
I converted my project from MVC 1 to MVC 2 and Visual Studio 2008
We've just switched our main project from Visual Studio 2008 to 2010. I was
I recently converted a multi-project Visual Studio solution to use .dlls instead of .libs
I have just converted a project from Visual Studio 2003 to 2005 and although
I recently installed Visual Studio 2010 and copied and converted an old VS2005 solution
I have a GUI C++ application (Visual Studio 2008) that needs to be converted
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I have a Visual Studio project that uses a solution file to build it.
Is there a tool that can run through a visual studio solution and adjust

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.