how do i get web.config.transform comments included

Aug 20, 2011 at 7:25 PM

i have a web.config.transform where i want to include comments following the keys that help self document their purpose and relevant values.   When nuget package processing inserts these web.config.transform values it strips the comments.   Is there a way to get it to keep the comments so i can include the self documenting help info for the end user?

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="WebConfigName" value="Default" />
    <add key="LogSource" value="MyWebProject" /> <!-- the name you want for your log source -->
    <add key="SomeBoolKeyValue" value="False" />  <!-- False | True -->
    <add key="SomeDateTimeKeyValue" value="0, 0, 0, 5" />  <!-- days, hours, minutes, seconds -->
  </appSettings>
 

Developer
Aug 20, 2011 at 11:28 PM

What does your target web.config look like? (The one in the application)

Aug 21, 2011 at 1:28 AM

after the nuget package has been installed the appSettings section has the web.config.transform appSettings applied but minus the self documenting usage comments, e.g. as show in following excerpt

<appSettings>
  <add key="WebConfigName" value="Default" />
  <add key="LogSource" value="MyWebProject" />
  <add key="SomeBoolKeyValue" value="False" />
  <add key="SomeDateTimeKeyValue" value="0, 0, 0, 5" />
</appSettings>

Aug 22, 2011 at 8:07 PM

This is a bug, tracked by http://nuget.codeplex.com/workitem/1190. I just added a new comment with more info about what works and what doesn't.