dotnet / dotnet/roslyn

Drag a file in a different folder causes unwanted code and formatting changes

Open
#75,463 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Drag-a-file-in-a-different-folder-causes/10749411)._

---
[severity:It's more difficult to complete my work]
Hi
As written in the subject when I drag a CS file in a different folder, the code inside the file changes:
- Tabs are modified from 2 (as in my settings) to 4
- All .Net types are converted in C# types (i.e. "Int32" is converted in "int")

You can check it by looking at the attached animated GIF.

---
### Original Comments

#### Feedback Bot on 20/9/2024, 07:28 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported case in Visual Studio: drag a .cs file into a different folder and compare the result with the original, using the attached animated GIF as the reference. Investigate where the move triggers tab-size changes and .NET-type simplification; done means the file moves without altering configured formatting or type spelling.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.