This is usually done by adding or modifying entries in your application’s web.config file. However, in some cases you don’t want to change the web.config directly, but patch through transform files instead (e.g. Sitecore Habitat uses gulp and msbuild to achieve this).
The xml below applies a binding redirect to assemble Newtonsoft.Json. It contains two tranform operations. The first one ,InsertIfMissing, inserts a new entry if the assembly entry doesn’t exist, and the second one, Replace, replaces it in case the existing redirect already exist.