Home > Software design >  How to fix missing semicolon erorr automatically visual studio c#
How to fix missing semicolon erorr automatically visual studio c#

Time:08-24

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

CodePudding user response:

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.

  • Related