Bjorn Reppen
Bjorn Reppen

Reputation: 22789

What is the naming convention for ASP.NET Core projects?

In ASP.Net Core the convention for projects seems to be to put the ASP.Net Core projects inside a src\ folder, and the test projects inside a test\ folder.

What other conventions are there, ie. where should a web (front-end only) project be located?

Upvotes: 1

Views: 1667

Answers (1)

Will Ray
Will Ray

Reputation: 10889

The honest answer to this is "it depends." The src and test folders at the root are a common structure seen in code repositories today.

Here are some common root folders and what they may contain:

  • test - Unit tests, UI tests, Integration tests, etc.
  • src - Source code projects
  • tools - Strong-name files and/or 3rd party tools that may be used to help tests or builds
  • build - Scripts to perform various builds on the project
  • docs - Documentation files for the project

How would you organize a web (front-end only) project inside an ASP.NET Core directory structure?

The only advice I can give without knowing your project, and the people interacting with it, is to keep it simple. I haven't found a need to add more root folders beyond what's seen above.

Keep in mind that there are certain folders that a default project template is going to use:

  • By default, Grunt is set up to look in the css, js, and lib folders under wwwroot for its bundling process.
  • Bower (also with the default template) will install packages into the lib folder under wwwroot.
  • MVC looks through the Views folder for view templates.

Upvotes: 3

Related Questions