My question is on config files, or dll.config for a class library project (dll). Does the dll have to be compiled for the changes in the config file to take affect?
The problem I’ve noticed is that I add a reference to another solution to my dll, and it still has a connection string that points to the test database, even though I’ve updated it in the config file.
If it does have to be compiled, what’s the point of having a config file?
DLL’s (Class Libraries) don’t use config files. You’ll need to set the configuration data via the application’s config file.
You could, if you really want to, have a class library use a config file, but I don’t think that’s best practice and kind of defeats the purpose of the class library, IMO.