PC Review


Reply
Thread Tools Rate Thread

How to change the Enterprise Library config file or connection string when moving to test/live environments

 
 
Rory Parore
Guest
Posts: n/a
 
      9th Nov 2006
Hi, I have a win forms app using Enterprise Library Data Access
Application Block and Visual Studio 2005. All the code uses the
default connection string to connect to the db, eg Database db =
DatabaseFactory.CreateDatabase();
I have a Setup Deployment project as part of my solution, which
packages the .exe, .dll, and .config files into an msi file for
deployment. I want to be able make installs for different
environments, eg Test and Dev, in which case I want the default
connection string to be different, eg for the Test database instead of
the Dev database. Any sugggestions on how i should set things up so
that i can do this without having to edit the config file before each
compile?
For example, can i have a Dev and a Test build configuration such that
the Test configuration will either use a different config file or make
a modification to the config file before it is included in the
deployment project?

This seems like it would be a common scenario but I haven't found any
suggestions on how to do it.

thanks in advance,

- Rory

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enterprise library connection string Rick Mavrovik Microsoft ADO .NET 1 29th Sep 2007 02:33 PM
Enterprise library connection string Rick Mavrovik Microsoft ADO .NET 0 10th Sep 2007 11:31 AM
Enterprise library - connection string Sami Rehman Microsoft Dot NET Framework 0 7th Sep 2007 04:49 PM
Test connection in Enterprise Library Jac Microsoft C# .NET 1 12th Jan 2007 08:49 PM
Reading enterprise library config file hhravn@gmail.com Microsoft C# .NET 0 26th Mar 2006 10:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:23 PM.