I am trying to insert a dependentAssembly element into my config where the child assemblyIdentity element doesn't already exist. However, I'm getting the following error
No element in the source document matches '/configuration/runtime/_defaultNamespace:assemblyBinding/_defaultNamespace:dependentAssembly[assemblyIdentity/@name='System.Web.Extensions']'
Below the relevant snippet of my config file and transform file. Are there any gurus here at Xslt transform that could help?
Sample Transform
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(assemblyIdentity/@name='System.Web.Extensions')">
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" xdt:Transform="SetAttributes" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Sample Configuration
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<configuration>