Tuesday, March 27, 2012

Configuration File Locations - Likes to say it can't load them in designer

I have a package and added a configuration file to it to hold settings such as connection strings etc.

When I open the package up in the designer and check where the configuration file is from, it likes to specify it with a full path like this:

\\myserver\projects\packages\blah.xml

Where blah.xml is the configuration file and the package file is in the same exact directory.

This creates an issue when I use build and then try to install the package on a server. When installing, the server tries to read the config from \\myserver\projects\packages\blah.xml which it can not.

Conversely I've tried editing the location in the designer changing it to just be "blah.xml". Then after using the build option I am able to install the package successfully on the server (it can not find the xml file).

However when I then load the package later in the designer to try to edit or chagne it, the designer complains that the "configuration file could not be loaded" and it can't find it even though it is in the same directory that the package definition file is in.

What's going on with this and how do i solve it?

Unless you replicate your file and folder structure accross machines I think it is reasonable to expect a few moans when it cannot find stuff. One option is to use indirect configurations, which basically means you store the file location in an environment variable Plenty in Books Online, and Jamie talks about them here as well-

http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2342.aspx

No comments:

Post a Comment