Razor/JavaScript and trailing semicolon

Is this a bug in Razor?

Absolutely not. Run your application, and it will work as expected.

It is a bug in the tools you are using (Visual Studio 2012, ReSharper, …) that are incapable of recognizing perfectly valid syntax and warning you about something that you shouldn’t be warned about. You could try opening an issue on the Microsoft Connect site and signalling this bug if that hasn’t already been done.

Leave a Comment