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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:05:40+00:00 2026-06-12T14:05:40+00:00

I have a solution in visual studio with 2 projects. A normal one and

  • 0

I have a solution in visual studio with 2 projects. A normal one and a ‘test’ project for NUnit tests. I have a reference in the testing project to the normal project. I tried adding tests and running them with the NUnit GUI, but I get an error saying it can’t find the ‘dll’ of the ‘normal’ project (I guess to get at the methods?). The thing is, the ‘normal’ project is not a class library, its an executable so the bin/Debug of the test project has normalproject.exe instead of normalproject.dll.

How can I get NUnit to work with this setup? I’d even be appreciative of a link to a tutorial that has this sort of setup, google searches so far hasn’t turned up anything.

The Actual error code I’m getting is:

Achievement.Tests.Achievement.BruiserTest.CheckNameAndDescription:
System.BadImageFormatException : Could not load file or assembly ‘Achievement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

  • 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-06-12T14:05:41+00:00Added an answer on June 12, 2026 at 2:05 pm

    Check is the accessibility of the classes you want to test. They have to be marked as public otherwise your test project won’t be able to see them to load them up.

    Another alternative to making your classes public is to use the InternalsVisibleTo attribute in your EXE and grant access to your test project DLL. Instead of public, you would just need to mark them as internal.

    In the EXE’s AssemblyInfo.cs:

    [assembly: InternalsVisibleTo( "Project.Tests" )]  
    

    There is no problem referencing an EXE instead of a DLL for your tests (technically speaking anyways; app architecture is another matter)

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

Sidebar

Related Questions

in Visual Studio I have a solution with several projects. In one project I
We have a Visual Studio 2008 solution with 58 projects. One project targets the
I have a Visual Studio 2010 solution that contains multiple projects. One of these
I have a Visual Studio C++ solution with 3 projects: one contains all classes
I have a Visual Studio solution containing 2 project: main project and test (via
I have a solution in Visual Studio 2008 with 3 projects. One Web Application
I have several Windows Service projects in one solution in Visual Studio 2010, they
I have a solution in Visual Studio 2008 which has multiple projects. One of
So in visual studio i have my solution with two projects, first one is
I have multiple Projects(site) in my Solution (visual studio 2010). when i run my

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.