/ Published in: Windows PowerShell
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function Set-ResharperLoadFromRemoteSources { <# .SYNOPSIS Adds .NET4 loadFromRemoteSources to all Test Runner config files of Resharper. .DESCRIPTION This script may be needed if you execute tests from a share environment (i.e. Clearcase views). .NOTES Removes the Readonly attribute on the files that are applied with the ReSharper installation. Needs to run elevated. #> [CmdletBinding()] param () $programFilesX86 = &{if ([IntPtr]::Size -eq 8) {${env:ProgramFiles(x86)}} else {$env:ProgramFiles}} $files = (dir "$programFilesX86\JetBrains\ReSharper\v5.1\Bin\JetBrains.Resharper.TaskRunner*exe.config") $files | %{ $node = $config.CreateElement("loadFromRemoteSources") $node.Attributes.Append($config.CreateAttribute("enabled")) $node.enabled = "true" $config.configuration.runtime.AppendChild($node) } }