DEV Community

Ben Collins
Ben Collins

Posted on

1

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay