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

Classes created as 'Internal' by default #142

Open
staffordkierandev opened this issue Feb 3, 2023 · 2 comments
Open

Classes created as 'Internal' by default #142

staffordkierandev opened this issue Feb 3, 2023 · 2 comments

Comments

@staffordkierandev
Copy link

Description

I use AddAnyFile by pressing Shift+F2 and typing a file name. e.g. myclass.cs. In the past, this always created the correct file for me with the public scope. However I have just recently started using the extension with Visual Studio 2022 and alas, it seems to create new class files with the internal scope. Is there a way to revert back to the preferred behavior? I write a lot of decoupled injected code so seldom use internal.

Steps to reproduce

  1. Within Visual Studio 2022 Solution Explorer, press Shift+F2 to create a new c# class file.
  2. Enter the filename (e.g. myclass.cs) into the dialog and press enter

Expected behavior: A new c# class gets created scoped as public

Actual behavior: A new c# class gets created scoped as internal

@GutierrezDev
Copy link

I have the same issue. Don't remember which version added this but it change my flow.

@StevenTCramer
Copy link

You probably are not actually using the extension.

Visual studio now has a built in AddQuickFile feature. That overrideds the Shift+F2

look at you keyboard bindings

image

To use this extension with Shift F2 you need to set the NewEmptyFile binding.

image

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

No branches or pull requests

3 participants