VSSpellChecker icon indicating copy to clipboard operation
VSSpellChecker copied to clipboard

C# 11 Raw String Literals Excluded From Spellcheck

Open kkm000 opened this issue 2 years ago • 1 comments

Configuration

  • Visual Studio 2022 v. 17.4.0 RC4 for Windows (rumors are it will have released on 11/03).
  • VSSpellChecker installed from inside VS, v. 2022.9.6.0, the latest available from the marketplace.

Issue

C# 11 has introduced a new syntax for multiline strings, see Raw String Literals. VSSpellChecker does not spell-check these, neither on-the-fly in the editor (VSSpellCheckEverywhere), nor using the spell-check tool window (VSSpellChecker).

Reproduction

  1. Install Studio 2022 Version 17.4.0 RC4 for Windows. The shorter RC download buttons are directly above the linked subheading and below the taller release version buttons, scroll up just a bit. The page is confusing. There is an option to install it SxS with an existing installation if so preferred. Make sure that .NET 7 option is selected during install, this adds C# 11 support. Install VSSpellChecker extension.

  2. Create a new C# project, select "NET 7" target in its properties, and paste the following to the Program.cs file:

    string rawString = """
      Files gerenated in the ouput diectory are deteted on abrot
      to preverse conistency of the daraset on mutliple runs.
      """;
    string regularString = "Files gerenated in the ouput diectory are deteted on abrot.";
    
  3. Observe that spelling errors are undersquiggled in the regularString but not in rawString:

    image

kkm000 avatar Oct 19 '22 14:10 kkm000

I'll take a look at it when it's generally available. Unfortunately, I don't have time to install and test with each of the previews and release candidates.

EWSoftware avatar Oct 19 '22 20:10 EWSoftware