Secrets of project.json file

By Dawid on (tags: ASP.NET, core, project.json, categories: code)

As you may already notice ASP.NET Core is using project.json files to controls almost all aspects of the project. It contains lot of section (which I will describe bellow) with full support of intellisense. That file is also synchronized with Solution Explorer – removing referenced from file will automatically update References node in Solution Explorer.

Here is the list of project.json sect:ion which can be used to configure you project:

  • name – this is the name of the project used for assembly name and the name of the package
  • version – Semver version of the project (used for NuGet project)
  • description – longer description of the project used in assembly properties
  • copyright – copyright information’s used in assembly properties
  • title – this is friendly name of the project (not allowed when using name property)
  • entryPoint – the entrypoint method of the project (main by default)
  • testRunner – here you can configure name of test runner to be used with project (for example NUnit or xUnit)
  • authors  - array of string with the name of the application authors
  • language – language of the project
  • embedInteropTypes – set this to true if you want to embed COM interop types in the assembly
  • preprocess – specifies which files will be included in preprocessing
  • shared – specifies which files are shared (used for library export)
  • dependencies – an object that defines the package dependencies of the project