'using' directives be inside the namespace

Issue

I am trying to make custom template project in Visual Studio 2019. In my template Project directives should be inside the namespace.
while coding I am keeping them inside. But when project generated I see them outside(my code is overwritten).

How can I make Visual Studio to place using statements in the namespace for every new project created using custom project template?

Solution

Have you tried You need to setup your preferred placement. You can find this option in the following path:

  • Options
  • Texteditor
  • C#
  • Code Style
  • change Preferred 'using' directive placement to Inside namespace

Preferences

Answered By – Christian Gollhardt

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.