Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring "move type to Typename.cs" now outputs the file to the root folder, rather than the folder of its current file. #6023

Closed
Dentyr opened this issue Aug 3, 2023 · 6 comments
Assignees
Milestone

Comments

@Dentyr
Copy link

Dentyr commented Aug 3, 2023

VS Code version: 1.81
C# Extension version: 2.0.320

Steps to reproduce

  1. make a folder in your project
  2. make a .cs folder in that file
  3. Add two types to the file, with one or either of them being different from the filename
  4. Refactor "move type to Typename.cs"

Expected behavior

The file should be in the current folder

Actual behavior

The output is in the root folder

Additional context

I reinstalled 1.26.0 and it worked fine on that version.

@dibarbet dibarbet added this to the August milestone Aug 4, 2023
@dibarbet
Copy link
Member

dibarbet commented Aug 4, 2023

@Cosifne there might be a dupe of this already, but I couldn't find it

@einari
Copy link

einari commented Aug 17, 2023

Also worth mentioning is that it used to open the new file in a new code window, something it doesn't do for me at least anymore.

@M0hammad124
Copy link

When new class or file adding to project the extension cannot analyze the new class or references
and intellisense also not working for the new class

@Cosifne
Copy link
Member

Cosifne commented Aug 21, 2023

Fixed in dotnet/roslyn#68995

Also worth mentioning is that it used to open the new file in a new code window, something it doesn't do for me at least anymore.

For this issue, see dotnet/roslyn#68550 (comment)

When new class or file adding to project the extension cannot analyze the new class or references
and intellisense also not working for the new class

@M0hammad124 if possible could you set dotnet -> sever -> trace to Trace and share the log under Output -> C# and see the log there? It would be great if you could paste it here. (It sounds like another issue, if you could give me the log I can create a new bug tracking this)

@Cosifne Cosifne closed this as completed Aug 21, 2023
@M0hammad124
Copy link

@Cosifne

Trace.txt

i add a new file with name 'GetCompletedEmployeeDt' and the intellisense not working in the new class
and in other classes intellisense is not familiar with 'GetCompletedEmployeeDt'

@Cosifne
Copy link
Member

Cosifne commented Aug 23, 2023

@Cosifne

Trace.txt

i add a new file with name 'GetCompletedEmployeeDt' and the intellisense not working in the new class and in other classes intellisense is not familiar with 'GetCompletedEmployeeDt'

Hi @M0hammad124 From the log you shared, it looks like part of your code was found by the project system and the newly added one is not. This looks like a bug and I am going to create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants