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 4273712
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:44:58+00:00 2026-05-21T07:44:58+00:00

I have a C# application that must run in x64 mode. The problem is

  • 0

I have a C# application that must run in x64 mode. The problem is I try to create unit tests that run methods in the x64 application and the unit test project won’t even build. I get the following error when it tries to build.

Error loading C:…..\bin\x64\Debug….UnitTests.dll: Unable to load
the test container ‘C:…..\bin\x64\Debug….UnitTests.dll’ or one
of its dependencies. If you build your test project assembly as a 64
bit assembly, it cannot be loaded. When you build your test project
assembly, select “Any CPU” for the platform. To run your tests in 64
bit mode on a 64 bit processor, you must change your test settings in
the Hosts tab to run your tests in a 32 bit process. Error details:
Could not load file or assembly
‘file:///C:…..UnitTests\bin\x64\Debug….UnitTests.dll’ or one of
its dependencies. An attempt was made to load a program with an
incorrect format.

I have tried to change the unit test to x64 and also Any CPU and still cannot get it to run. Is there any fix for this?

  • 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-21T07:44:59+00:00Added an answer on May 21, 2026 at 7:44 am

    I’m assuming that you are using Visual Studios testing framework since you mention no other.
    In VS2010 you can force the testing host to run in x64.
    Build your assemblies as Any CPU or x64 then set the test host to x64.

    http://msdn.microsoft.com/en-us/library/ee782531.aspx

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

Sidebar

Related Questions

I have a 32-bit application that must run on a Windows x64 server using
I have a project that must be compiled and run in 64 bit mode.
I have just been handed a huge project for an application that must run
I have C# application that must store some information into MS SQL that would
ISS and ASP.NET. In my setup I have a web application that must be
I have an application that must use a library that I didn't write and
I have a web service that must run an executable. To run the executable
I have a dynamic application that need to create a window interface with checkbox.
I have to run my C# application that I wrote it recently on several
I have a .NET server application that must store passwords that can't be hashed

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.