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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:10:42+00:00 2026-05-31T17:10:42+00:00

I have a .NET 4.0 C# solution with a tests project which runs unit

  • 0

I have a .NET 4.0 C# solution with a tests project which runs unit tests under NUnit. The NUnit binaries are v3.5.

I can run the tests perfectly well, but I can’t set breakpoints and single step in Visual Studio. I’m guessing this is caused by the mismatch in .NET versions. Is there a way to single step through a v4.0 tests assembly using NUnit for v3.5?

  • 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-31T17:10:44+00:00Added an answer on May 31, 2026 at 5:10 pm

    The problem is that unless you tell it otherwise, NUnit will spawn a subprocess to run tests when it determines it necessary. If you watch it in Process Explorer, you can see that "nunit-console.exe"* spawns "nunit-agent.exe"*. The Visual Studio debugger doesn’t automatically attach to child processes.

    In this case, I believe the version mismatch is why it chooses to start a subprocess. The easiest way to work around this is to edit "nunit-console.exe.config"* to change the set of <supportedRuntime> values. There should already be a comment there marking the line that you should comment out in order to force it to run as .NET 4.0:

    <startup useLegacyV2RuntimeActivationPolicy="true">
      <!-- Comment out the next line to force use of .NET 4.0 -->
      <supportedRuntime version="v2.0.50727" />
      <supportedRuntime version="v4.0.30319" />
    </startup>
    

    Once you change that, the first NUnit process will already be .NET 4.0 and it shouldn’t need to spawn a subprocess. If you want to be sure, specify /process=Single and NUnit will either run in a single process or fail immediately if it cannot.

    * – If you need to use the x86 versions, substitute:

    nunit-console.exe        -> nunit-console-x86.exe
    nunit-agent.exe          -> nunit-agent-x86.exe
    nunit-console.exe.config -> nunit-console-x86.exe.config
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a reasonable sized ASP.net solution that has no automated tests. The
My VS2010 solution has a test project in it. The unit tests themselves reference
So I have a VS 2010 solution containing one ASP.NET MVC 3 project and
In my current .Net 4.0 solution, I have one project containing a lot of
We have tests using WatiN that we want to run on our CruiseControl.NET server.
I have a solution with two projects within: Company.Project.vbproj Company.Project.Tests.vbproj Within the Company.Project.vbproj assembly,
We have VS.Net solution with 20 projects in it. Occasionaly, in VS.NET, when we
I have a simple question. Let's say I have a .Net solution, with different
I have a vb.net solution with a web reference to a webservice. Now I
We have an ASP.Net MVC solution built in VS2008 and TFS2008. We use TFS

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.