Nuget config transforms - disable them for a dependency

Topics: General
Mar 2, 2014 at 3:14 PM
Hello all

I would like to propose something, based on a situation i'm in.

I create a package which handles the web.config by templates and not by editing the web.config directly. Specifically after package install, there is a web.config.template file in the project, so the developer can copy paste it, change it and so on. The config template includes everything required by dependent packages.

The package of course has dependencies to the libraries it needs, which some of them contain web.config transforms, that are run before my package is installed.

So although i want to keep the web.config intact and have a template workflow, i can't because other packages don't respect that!

Wouldn't be nice to have the ability to do something like this:
<dependency id="elmah" version="1.2.2" applyTransforms="false" />

Mar 3, 2014 at 11:02 PM
in case of elmah this can be accomplished by installing only the package elmah.corelibrary which contains only the dll. The elmah package adds the config transforms. So this might be a solution: if your package applies config transfroms publish 2 packages one core library and one that applies the transforms on top of it.
Mar 22, 2014 at 12:09 AM
no one finds this idea worth considering? or worth commenting? Am i the only one who finds that editing a web.config without giving the user the ability to opt-out is a bit too intrusive?