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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:12:31+00:00 2026-05-23T14:12:31+00:00

I have a simple solution where I put in a c# class library project,

  • 0

I have a simple solution where I put in a c# class library project, and referenced nunit dll etc.

I created a .cs file, added [testfixture] and a simple [test]

If I go to Test -> Run -> Test in current context (or even all in solution)

I get the error:

No tests were run b/c no tests are loaded or the selected tests are disabled.

I did compile the project.

SomeTest.cs

using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

[TestFixture]
public class SomeTest
{
   [Test]
   public void Test1()
   {
       Assert.AreEqual(1, 1);
   }

}
  • 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-23T14:12:31+00:00Added an answer on May 23, 2026 at 2:12 pm
    • In case of NUnit, I doubt whether VisualStudio support by default for running tests. Your problem might be simplified if you use VisualStudio.TestTools.UnitTesting (in case you dont actually need nUnit)

    If you do require nUnit, try looking here

    I figured out the problem. The problem is that you have added the test project as a class library. There is a template available with VisualStudio that goes ‘Test Project’ that creates a test project. But I am guessing that it does something behind the screens to enable you to run the tests from Visual studio. I verified this by creating two projects – one of type Test Project and one of type Class Library.

    I had the same test class in both projects, but I was able to run the test only in the ‘Test Project’. But this worked only for Microsoft’s inbuilt unit testing framework. Nunit doesn’t seem to work still(even if you create a test project and add a nunit test there).

    You could try VisualNUnit, which is a test runner for Visual Studio 2010.

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

Sidebar

Related Questions

It looks like a problem which could have simple solution, but I haven't found
I have a very simple problem which requires a very quick and simple solution
I have a deceptively simple scenario, and I want a simple solution, but it's
Im sure there is a very simple solution for this. I have a bunch
Probably a long question for a simple solution, but here goes... I have a
I have a somewhat simple Client/Server solution running over C# remoting (System.Runtime.Remoting). The MarshalByRef
I have a very simple problem and a solution that will work, but I'm
I have a very simple problem but cannot find a nice solution. I have
My problem (and solution?) is simple - I hope :) I have a RIA
I am testing a simple threadpool solution before I put it in my application,

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.