-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Hello,
The current solution with a target to replace web.config with the build config file is not so bad, but implies to version kind of "statics" binding redirects. Moreover, I guess they will remains even if your dependancy doesn't need a binding redirect anymore, or if you uninstall it...
I suggest something like that in SystemWeb targets :
<Target Name="AfterBuild">
<XmlPeek XmlInputPath="$(TargetDir)\$(AssemblyName).dll.config"
Query="/configuration/runtime">
<Output TaskParameter="Result" ItemName="GeneratedBindings" />
</XmlPeek>
<WriteLinesToFile
File="$(TargetDir)\Web.bindings.config"
Overwrite="true"
Lines="<?xml version="1.0"?><configuration>;@(GeneratedBindings);</configuration>" />
</Target>And in your personal Web.config you remove ALL the binding redirects and you replace them by :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
[...]
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<linkedConfiguration href="file:./bin/Web.bindings.config"/>
</assemblyBinding>
</configuration>What do you think about it ?
Metadata
Metadata
Assignees
Labels
No labels