Closed CTGreg closed 3 years ago
Here is the version
I'm experiencing this issue too with .razor files.
This issue is also appearing in aspx and asmx files for me. From what I have been able to figure out from what is copied, it seems that is copying the generated backend code. Example: The top part of my aspx site contains there lines:
<%@ Page Language="VB" %>
<%@ Import Namespace = "System"%>
<%@ Import Namespace = "System.ComponentModel"%>
<%@ Import Namespace = "System.Diagnostics"%>
<%@ Import Namespace = "System.Web.Services"%>
<%@ Import Namespace = "System.Web.Services.Protocols"%>
<%@ Import Namespace = "System.Xml.Serialization"%>
When I copy text that is further down, the text that is copied looks like this:
Imports System
Imports System.ComponentModel
Per https://developercommunity.visualstudio.com/content/problem/1193868/copy-and-paste-is-broken-in-razor-cshtml-files.html a workaround is to turn off the "Copy without indentation" feature in Tools > Options > Environment > Tweaks
This is now fixed in the latest version