简体   繁体   中英

'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

喜好

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM