473,657 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nunit: Where does the .config file go?

I have created a file, called nunit_project_n ame.dll.config, within
the bin folder of my Nunit project, but Nunit is not able to find the
file. Is this is the right location?

I can access the proper connection string if I put in in the
machine.config file, but obviously this is not the best choice. I
must be putting the file in the wrong dir, but I have tried pretty
much every location that I can think of.

Help would be greatly appreciated.

Thanks

Oct 21 '07 #1
2 3179
I think it should be in the same directory as the NUnit project file
nunit_project_n ame.nunit. I think it's also the case that by default the
..config file name should be nunit_project_n ame.config, not
nunit_project_n ame.dll.config, though you can change this default via the
GUI runner options.

If you just manually place the .config file in the output bin directory, it
may get wiped on a build. If you are using VS2005 & .NET 2.0, you can also
try the following:
1. Add the config file to the VS2005 NUnit project
2. In the properties for this file, set "Copy to output directory" to "Copy
always"
3. Check that you are reading the config settings using the .NET 2.0 API
System.Configur ation.Configura tionManager.App Settings, rather than the .NET
1.1 API

"chris" <ol*********@gm ail.comwrote in message
news:11******** **************@ i13g2000prf.goo glegroups.com.. .
>I have created a file, called nunit_project_n ame.dll.config, within
the bin folder of my Nunit project, but Nunit is not able to find the
file. Is this is the right location?

I can access the proper connection string if I put in in the
machine.config file, but obviously this is not the best choice. I
must be putting the file in the wrong dir, but I have tried pretty
much every location that I can think of.

Help would be greatly appreciated.

Thanks

Oct 22 '07 #2
For some reason the Nunit gui wasn't picking it up, but when I ran the
same tests with resharper it was able to access the .config file that
was placed in the location that you mentioned.

Thanks for the help

Nov 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
494
by: Klas Mellbourn | last post by:
I have several assemblies, in separate dll:s, each with nunit tests embedded. Every assembly requires its own config file. I would like to run all nunit tests on the same command line. Like this: > nunit-console.exe foo.dll bar.dll Both foo.dll.config and bar.dll.config exists in the same directory. What seems to happen, though, is that only one of the config files is loaded (bar.dll.config), wich causes my nunit tests in foo.dll to...
0
998
by: Mike | last post by:
I found this message posted from last year: I'm using NUnit to test my assembly. When my assembly runs (.exe) normally it uses it's .config file, but when I test my assembly using NUnit it wants to use the NUnitGUI.exe.config which is understandable. I'm wondering can I tell my app to think that a different file is its
1
1705
by: Peter Rilling | last post by:
When running my unit tests for our web project, I am having a difficult time getting values from the config file. When running from the web server, the config file is able to be read from the web.config. When I run from nUnit, I get a null. I added our config settings to the nunit-gui.exe.config, but no luck. Am I missing something.
2
2055
by: Erik | last post by:
Hi! When running NUnit tests against my ASP.NET application I want the values in the web.config to be loaded, otherwise connectionstrings and other configurations won't be availible and the tests will fail. How do I load the web.config from the NUnit tests? /Erik
6
6069
by: tchaiket | last post by:
Hey all, I'm using NUNIT to test our classes. However, I don't want to hard code test data into the NUNIT classes. For example, to test adding a new Client, I don't want to hard code the Client Name, phone number, email, etc. I want to the NUNIT to read this data from a file. This way I can change the data in a file easily and test various types of test data. I think this can be done using the CONFIG file that NUNIT reads. Is
2
5154
by: JohnGoogle | last post by:
Hi, I'm a newbie so sorry if there is a simple answer to this! I'm using C# in Visual Studio Express at the moment. I've downloaded NUnit v 2.2.8 and can load and run the tests they supply (e.g. nunit.util.tests.dll) so the install of NUnit seems OK. I've compiled one of the sample projects (csharp-sample_VS2005). When I do so I get the following warning after a build:
1
1962
by: Gonza | last post by:
Hi group, i'm trying to create tests for my solution, so i have a project with nunit tests. I'm using the data application block as my data access layer, and the problem i'm having is that when i try to run a test that uses the block i get an exception because the block can't read the configuration file (i supose it doesn't know where to look) and therefore can create a connection to the database. Any ideas? Thanks in advance
1
1091
by: NW Technicals | last post by:
I have a web application which is developed as a layered projects. To test this project(s) I have written Unit Tests to cover the DataAccessLayer etc., DAL access the ConnectionString etc., from the Web.config How do I make this web.config available at the runtime for nUnit based unit tests.
1
2995
by: nyathancha | last post by:
Hi, I am using WSE to implement security using x509 certificates. This works when I use a windows client but throws an exception when I use NUnit. My Code looks as follows : UsernameToken myCurrentToken = new UsernameToken("xxxx", "YYY", PasswordOption.SendPlainText); MyServicesWse adminServices = new MyServicesWse();
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.