Use of project.json is to store metadata ,compilation information and project dependencies. It is replacement of ASP.NET 5 package.config and we store all the package information whichwe want to use in our application . we use JSON notation to feed all required things. which is nothing just a key value pairs. For example
I am going to discuss about all important or basic attributes of this file
Dependencies are very important factor in case of asp.net application execution. All the dependencies information is updated into this file whenever we install any package from nuget package manager. It will store complete information of package like version and type etc.
Tools are the object which are used during the compilation or in application build process but at runtime tools are not used .please note down one things that these are the tools not the references.
ITW includes information about Dot Net Framework which we are going to use into our current application actually we have two types of Dot Net Application first applications which are posted on the windows platform only that condition we can use Framework 4.5 4.6 and this application use Dot Net Framework CLR but if you want to who’s Java application on Windows Linux on a platform so that time we will take Dot Net core framework
This object is used to store all compilation aspects.
emitentrypoint is used to tell compiler that this current project is a application not a library or we can say that this application having the main function(public static void main)
preserveCompilationContext is to Help in running of razor views.
Specifies parameters to be provided to the runtime during initialization.
This object Contains configuration properties to configure the runtime and the framework.
It Will enable the garbage collection at server side,by default it is false.
An object containing properties for compilation configuration.We can include and exclude compilation build properties.Exclude property is used to prevent build or compilation of particular object like bin directory.
“postpublish”: [ “dotnet publish-iis –publish-folder %publish:OutputPath% –framework %publish:FullTargetFramework%” ]
An object that defines scripts run during the build process. Each key in this object identifies where in the build the script is run. Each value is either a string with the script to run or an array of strings containing scripts that will run in order.