GithubHelp home page GithubHelp logo

gtteamamxx / vsnamespacefixer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pautx24/vsnamespacefixer

0.0 0.0 0.0 306 KB

An extension for VS in order to fix the namespace.

License: MIT License

C# 100.00%

vsnamespacefixer's Introduction

Visual Studio Namespace Fixer

An very simple and light extension, compatible with VS 2015, VS 2017 & VS 2019.

It works for C#-like and VB.NET namespace format. Now it supports XAML files as well!

Adds an 'Adjust namespace' option on your Solution Explorer contextual menu. It will only appear for files (one or more) and folders (one or more) for the same project. Just right-click them and you will see how it works.

There are a couple of options you can choose from (can be found at Tools > Options > Namespace fixer options):

  1. The extensions of the files that will be ignored when adjusting the namespace.
  2. Customize how the namespace will be formatted. The specified sections that matches the expected ones will be replaced and any other text will remain. The sections that can be used are:
  • {solutionName}: just the solution file name.
  • {projectName}: just the project file name.
  • {projectRootNamespace}: the 'Default namespace' specified in the properties of the project.
  • {projectToSolutionPhysicalPath}: the path from the project file directory to the solution file directory.
  • {fileToProjectPath}: the physical path from the file adjusting the path of to the project directory.

The default namespace format is specified as: {projectName}{fileToProjectPath}.

The source code can be found on GitHub. The extension is available in the Marketplace.

Hope it fits for you.

Example

Special thanks go to the pull-requesters:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.