473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Nunit: Where does the .config file go?

I have created a file, called nunit_project_name.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 3148
I think it should be in the same directory as the NUnit project file
nunit_project_name.nunit. I think it's also the case that by default the
..config file name should be nunit_project_name.config, not
nunit_project_name.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.Configuration.ConfigurationManager.AppSetti ngs, rather than the .NET
1.1 API

"chris" <ol*********@gmail.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
>I have created a file, called nunit_project_name.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
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: ...
0
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...
1
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...
2
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...
6
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...
2
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...
1
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...
1
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.,...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.