473,396 Members | 1,599 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,396 software developers and data experts.

Enterprise library and Nunit Question

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

Jan 4 '07 #1
1 1951
Gonza,
NUnit will pick up a "*.config" file that is the same name +".config" and is
in the same directory as the dll. In your property Build event you want to
copy an appropriate config file, perhaps your exe app.config file, to the dll
location. An example post build event would be:

copy /Y "..\..\..\CCUApp\app.config" "$(TargetDir)$(TargetFileName).config".

NUnit documenation does mention the config file being picked up.

- Marc

"Gonza" wrote:
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

Mar 2 '07 #2

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

Similar topics

0
by: Vinny_Davis | last post by:
Hi - I installed Enterprise Library successfully. Under the DAAB area I am seeing two VS solution links. One says "Data" and another says "Data Design". What is the difference? Thanks, Vinny
2
by: bjhogan | last post by:
Hi, I have built an c# asp.net application on my laptop, it uses the Enterprise Library blocks - Data Access Application Block, Configuration Application Block. I now want to deploy my...
6
by: Jonathan Crawford | last post by:
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473 Hi I have installed the enterprise library on a development machine and created a project on our webserver. When...
2
by: Patrick | last post by:
I am using the Microsoft enterprise Library (June 2005) with .NET Framework 1.1 on a Windows 2003 IIS6 web server. with an ASP.NET 1.1 application, I have a dataConfiguration.config as listed at...
4
by: uanmi | last post by:
Please create an Enterprise Library Forum asap. There is no help on gotdotnet for the many people asking questions. My project is stuck without some answers. -- regards, Mark
0
by: Chris Dunaway | last post by:
Enterprise Library January 2006 Visual Studio 2005 Lanugage: C# I am attempting to use the Enterprise Library to read data from an Excel spreadsheet file. I got the following connection...
2
by: rockdale | last post by:
Hi, all I am using Enterprise Library for .NET Framework 2.0 - January 2006 to access my backend MS SQL database. As now we are consider migrate sql database to mySQL. What engine (ODBC or...
0
by: =?Utf-8?B?YW5rMmdv?= | last post by:
Hi, Thanks in advance for reading this. Not sure where to post this question, but I hope someone in here can help. Trying to write to Event Log in VS 2005 (.NET 2.0) using Enterprise Library...
1
by: GaryDean | last post by:
I now have installed (from the same install) Enterprise Library - January 2006 and Enterprise Library - June 2005. The install for these two was called Enterprise Library for .Net 2.0. (not...
1
by: AutoTrackerPlus | last post by:
I'm using the EL 2.0 library. I have a datalayer where I am debating doing 2 things... I'm concerned that because I am using a IDataReader, my connection to the database is never getting closed and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.