DEV Community

Ben Collins
Ben Collins

Posted on

Upgrading C# in your Razor files with PowerShell

git ls-files | sls web.config ` # get a list of web.config files here, but not with Get-ChildItem
  |% { (gc $_) -replace "/langversion:default","/langversion:latest" ` 
  | sc -Path $_ -Encoding UTF8 }

Top comments (0)