'using' directives be inside the namespace


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?


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


Answered By – Christian Gollhardt

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.