JamieDixon / GraphViz-C-Sharp-Wrapper

GraphViz C# Wrapper
93 stars 55 forks source link

Change install.xdt files to insert appSettings if missing #18

Closed bdrupieski closed 7 years ago

bdrupieski commented 7 years ago

When installing GraphViz.NET in a project that does not have an app.config or web.config file, the following error occurs during installation:

An error occurred while applying transformation to 'app.config' in project 'App' No element in the source document matches '/configuration/appSettings/add' No element in the source document matches '/configuration/appSettings/add'

This will prevent complete installation, since the packages.config file will then not be updated to add an entry for GraphViz.NET.

This PR modifies the app.config.install.xdt and web.config.install.xdt files to insert the missing appSettings section in the respective config file if it does not exist and insert the key graphVizLocation if it does not exist. This fixes the problem and the package can be installed successfully even in the absence of an appSettings section.

This fixes issue #14.

JamieDixon commented 7 years ago

This is great @bdrupieski Thanks for doing this 👍