RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
544 stars 135 forks source link

NuGet package installer ignores configsource in web.config file #215

Open bencurthoys opened 3 years ago

bencurthoys commented 3 years ago

I use the "configSource" property on parts of my web.config file, so that I can have one master web.config file which is the same for all customers, and then parts which vary between customers (e.g. globalization settings) are isolated into separate files:

image image

When I install or update Westwind Globalization with NuGet, it edits my web.config (which I accept is normally a helpful thing to do) and adds the resourceProviderFactoryType="Westwind.Globalization.DbSimpleResourceProviderFactory,Westwind.Globalization.Web" setting to the globalization tag so it looks like this:

image

which is not allowed and causes it to throw an error. (There's a similar problem with the DbResourceConfigration section).

The installer should check for the presence of a configSource property, and if it exists, update the targeted config file instead of breaking web.config.