@REM este script deve ser executado no diretório do site, diretório do serviço ou em um diretório que esteja acima de ambos.
@powershell -NoProfile -ExecutionPolicy Bypass -Command "write-host `n`rUpdate Zuri assembly bindings`n`r -foreground cyan; $ns = @{binding = 'urn:schemas-microsoft-com:asm.v1'}; gci -path . -recurse -depth 1 -filter *.config | foreach {$f = $_.FullName; $ok = $false; write-host $f -foreground Blue ; [xml]$cfg = get-content -Path $f; Select-Xml -Xml $cfg -Namespace $ns -XPath '//binding:dependentAssembly' | foreach {$n = $_.node.assemblyIdentity.name + '.dll'; $a = @(gci -path $root -filter $n -recurse -depth 1 -erroraction silentlycontinue)[0].FullName; $v = [Reflection.AssemblyName]::GetAssemblyName($a).Version.ToString(); $_.node.bindingRedirect.oldVersion = '0.0.0.0-' + $v; $_.node.bindingRedirect.newVersion = $v; $ok = $true; write-host $a $v}; if($ok){$bkp = $f -replace '.config$','.config.bak'; copy-item $f -destination $bkp -force; write-host '[configuration backup]' $bkp -foreground magenta; $cfg.Save($f); write-host '[assembly bindings updated]' `n`r  -foreground Green}else{write-host '[no assembly bindings found]' `n`r -foreground Yellow} }"
@pause