How to fix missing semicolon error automatically visual studio c#

591 Views Asked by At

How to fix semicolon missing errors automatically c#. I have an old project in which semicolon missing in most of the lines. how to include the missing semicolons automatically using visual studio or any other extension

enter image description here

1

There are 1 best solutions below

0
emilsteen On BEST ANSWER

I would do this:

  • Open up Replace in file.
  • Select "Use Regular Expressions".
  • Enter ".$" in Search term (no quotes).
  • Enter ";" in Replace term (no quotes).

Now do replace single or replace all. Replace all will add too many semicolons (blank lines and comments and all other), but will probably give less than 1800 errors to fix.

Tested it in Visual Studio 17.3.1.