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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:56:26+00:00 2026-05-26T11:56:26+00:00

Using TeamCity 6.5.1 NUnit version 2.5.10 Win2008 x64 Project is using .NET 4.0 Trying

  • 0

Using TeamCity 6.5.1
NUnit version 2.5.10
Win2008 x64

Project is using .NET 4.0

Trying to execute the built-in TeamCity NUnit test runner, I receive the following error:

NUnit error running tests in ‘E:\TeamCity\LocalBuildAgent\BuildAgent\work\698a8f459eac8cd9\MyProject\bin\Release\MyProject.Tests.dll’ assebmly
System.BadImageFormatException: Could not load file or assembly ‘E:\TeamCity\LocalBuildAgent\BuildAgent\work\698a8f459eac8cd9\MyProject\MyProject.Tests\bin\Release\MyProject.Tests.dll’ or one of its dependencies. This
assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

  • 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-26T11:56:27+00:00Added an answer on May 26, 2026 at 11:56 am

    My stack is pretty much identical to yours…so, I am going to take a shot in the dark here.

    If you go into the Build Step you designated in Team City for running NUnit and find the .NET Runtime section and make sure Platform is set to “auto(MSIL)” and most importantly check to make sure version is set to v4.0.

    I have seen your exact error when attempting to run unit tests for a 4.0 project against the 2.0 framework setting.

    If it isn’t that, I would suggest checking directory permissions and that the System or Network Service accounts which I think team city runs on (unless specified otherwise) can access the directory that your tests.dll resides in.

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

Sidebar

Related Questions

I am using the built in TeamCity NUnit runner to run tests stored in
Using TeamCity, I'm trying to get a (TestAutomationFX) test that requires an STA thread
I'm trying to run Watin from within a TeamCity build, using nUnit. All tests
I'm using TeamCity Professional Version 4.5.4 (build 9071) at work to build my asp.net
i'm using teamcity 5.1.5.. trying to build an MSBuild project with an AfterDeploy target
How to increment the Assembly version on each build in TeamCity using Build Runner
Im using TeamCity with Gallio/XUnit/Specflow and trying to display our unit/acceptance test results. I
I am trying to setup a .net build using Teamcity. We got it to
I have a C++ Builder 2010 project that's being built using TeamCity . I
I am using NUnit (2.4.6) and my build/test night are done with Team City

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.