Home > Enterprise >  Visual Studio - pasting text into cshtml deletes text
Visual Studio - pasting text into cshtml deletes text

Time:06-01

In Visual studio (2022; v: 17.2.1) when I paste some text into a cshtml file, that same text seems to get copied, but then immediately deleted; including part of existing text. This only seems to happen when overwriting jquery code (anywhere within <script> tags).

A very similar problem is already discussed here with no (usable) solution: Format on paste can be removed

Preferences -> Source Code -> Code Formatting -> HTML, switch to the HTML Format tab and uncheck Format on paste.

  • Related