Block nuget from installing certain files from a package?

Topics: General
Sep 10, 2014 at 10:37 PM
Is there any way to tell nuget not to install/merge certain files from a package? For instance, every time I install or update a package it merges the web.config.tranform with my web.config and it breaks my site. I would like to install the package, but opt out of web.config changes. Is this possible at all? As it is, my project is usually source controlled so when I update the package, I just undo any changes to my web.config, which is fine by me, but is an extra step that some people may have a hard time remembering.

Another example is where I have created a package, and it depends on a package with a web.config.transform. Users install my package and get these web.config changes from the one I depend on, and they mess with their site as well.

If this option isn't available, do you have any suggestions apart from asking the package owner to not include the files?