How to use .xdt file
<p>I have followed the following post <a href="https://stackoverflow.com/questions/17971083/nuget-config-transform-formatting-issue">Nuget Config.Transform Formatting Issue</a> to add web.config file entries in NuGet.</p>

<p>I have used the below xdt file in my NuGet package</p>

<p>
    </p>

<pre><code>    &lt;compilation&gt;
        &lt;assemblies&gt;
            &lt;add assembly="ASSEMBLY1, Version=1.0.10, Culture=neutral" xdt:Transform="Insert"/&gt;
            &lt;add assembly="ASSEMBLY2, Version=1.0.11, Culture=neutral" xdt:Transform="Insert"/&gt;
            &lt;add assembly="ASSEMBLY3, Version=1.0.12, Culture=neutral" xdt:Transform="Insert"/&gt;
            &lt;add assembly="ASSEMBLY4, Version=1.0.13, Culture=neutral" xdt:Transform="Insert"/&gt;
        &lt;/assemblies&gt;
    &lt;/compilation&gt;
&lt;/system.web&gt;
</code></pre>

<p>and i have tried to install this NuGet am getting the following error. Error An error occurred while applying transformation to 'web.config' in project 'WebApplication60' No element in the source document matches '/configuration/system.web/compilation/assemblies/add' 0</p>

<p>Since the assemblies node was not found in the project. I have tried to add xdt:Transform="Insert" to assemblies node, but it causes duplicate entries in web.configfile like below</p>

<pre><code>&lt;assemblies&gt;
                &lt;add assembly="ASSEMBLY1, Version=1.0.10, Culture=neutral" xdt:Transform="Insert"/&gt;
                &lt;add assembly="ASSEMBLY2, Version=1.0.11, Culture=neutral" xdt:Transform="Insert"/&gt;
                &lt;add assembly="ASSEMBLY3, Version=1.0.12, Culture=neutral" xdt:Transform="Insert"/&gt;
                &lt;add assembly="ASSEMBLY4, Version=1.0.13, Culture=neutral" xdt:Transform="Insert"/&gt;
&lt;add assembly="ASSEMBLY1, Version=1.0.10, Culture=neutral" xdt:Transform="Insert"/&gt;
                &lt;add assembly="ASSEMBLY2, Version=1.0.11, Culture=neutral" xdt:Transform="Insert"/&gt;
                &lt;add assembly="ASSEMBLY3, Version=1.0.12, Culture=neutral" xdt:Transform="Insert"/&gt;
                &lt;add assembly="ASSEMBLY4, Version=1.0.13, Culture=neutral" xdt:Transform="Insert"/&gt;
            &lt;/assemblies&gt;
</code></pre>

<p>How to avoid this duplicate entries?</p>