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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:50:51+00:00 2026-06-10T23:50:51+00:00

I have written a NUnit tests for a .NET application. When I run the

  • 0

I have written a NUnit tests for a .NET application. When I run the NUnit, it does not read the connection string values from the configuration file. I tried many solutions with out success, like

  1. Adding <assembly name>.dll.config file in the path where NUnit loads the DLL file.
  2. Adding the configuration settings in NUnit.exe.config/NUnit.gui.config

I wasn’t able to read the configuration setting even when run in VSNunit. Is there a solution?

  • 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-10T23:50:53+00:00Added an answer on June 10, 2026 at 11:50 pm

    I’ve assumed

    • Assembly being tested: SomeNameSpace.MyClassLib
    • NUnit assembly with unit tests: SomeNameSpace.MyClassLib.Test

    Try this:

    1. Make sure that you have also copied your app.config to your NUnit Test DLL class library (i.e. project SomeNameSpace.MyClassLib.Test) as well.

    2. Build your NUnit Project (e.g. to SomeNameSpace.MyClassLib/bin/debug) and make sure that following are in the bin\debug (or release) directory

      • the assembly to be tested,
      • the NUnit test DLL and
      • the configuration (SomeNameSpace.MyClassLib.Test.config)
      • any other assemblies needed by your DLL file being tested.
    3. Edit your NUnit Project in the XML view of the NUnit GUI Project editor (menu Project → Edit, or just edit it in Notepad), and make sure that the test assembly (MyClassLib.Test.dll) and the configuration file names are relative to your appbase

      For example,

      <NUnitProject>
        <Settings activeconfig="Debug" processModel="Default"
                  domainUsage="Default"
                  appbase="C:\Temp\MyProject\MyClassLib.Test" />
        <Config name="Debug" binpathtype="Auto"
                configfile="bin\Debug\MyClassLib.Test.dll.config">
          <assembly path="bin\Debug\MyClassLib.Test.dll" />
        </Config>
        <Config name="Release" binpathtype="Auto" />
      </NUnitProject>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple functional tests written as NUnit test which are independent from each
I have written unit tests under NUnit that use TestFixtures with different parameters. Now,
I'm using NUnit and TeamCity and I have written some system tests with descriptions.
I have written a simple test application using asp.net mvc with C#. The application
We have a C# application written in C# and recently switched over from MbUnit
I have unit tests written using nUnit and tests are structured in a similar
I have written some system tests using C#, Selenium and NUnit and configured my
I have written a small Asp.net application using Entity Framework. A Stored Procedure accepts
I have written this code inside a servlet to delete certain records from three
I have written a function that extract the domain from hostname. e.g. www.domain.com ->

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.