Back To FAQ

ASP.NET Core - global.json

The global.json file is created by default in the ASP.NET Core 1.0 application under Solution Items folder in Visual Studio.

asp.net core global.json

The following is the default global.json in ASP.NET Core 1.0 application.

global.json
{
  "projects": [ "src", "test" ],
  "sdk": {
    "version": "1.0.0-preview2-003131"
  }
}

global.json is a JSON (JavaScript Object Notation) file which includes settings related to the entire solution.

The projects setting is used to specify different folders which are part of your ASP.NET Core application. These folders may contain another project to support your application such as unit test project, the business layer or data layer projects of your application. The .NET Core CLR use this information to find the source code to compile.

The sdk setting is used to specify the version of DNX under which the project is to be run. (DNX is a runtime and a toolset used to build ASP.NET Core 1.0 applications.) The sdk section can include following settings:

  • version setting specifies the version of DNX used e.g. "1.0.0-preview2-003131" or "1.0.0-rc1-update1".
  • runtime settings can be used to specify the CLR to be used to run the project. The possible values are clr for ASP.NET 4.6 runtime or coreclr for ASP.NET Core 1.0 runtime. If we don't specify this, the app will be compiled for both runtimes.
  • architecture settings can be used to specify computer architecture x86 or x64.