Search code examples
c#asp.net-mvcasp.net-coredotnet-cli

Is .NET CLI only for .NET Core?


Do I use the .NET CLI if I want to create an ASP.NET Core 1.0 app that uses the .NET Framework? Is .NET CLI only for the new .NET Core library or both Core and .NET 4.6?


Solution

  • Do I use the CLI if I want to create an ASP.NET Core 1.0 app that uses the .NET Framework?

    The .NET CLI is for either, the distinction is actually made in the project.json file. For example you can use the following command to compile/build the ASP.NET Core application while the application is actually targeting the full-framework:

    dotnet build

    Here is what an example project.json would look like targeting .NET 4.6.

    {
      "frameworks": {
        "net46": { }
      }
    }
    

    For more details I always encourage people to refer to the documentation found here. Likewise, since this is open-source (which is amazing) you can look at the source to understand how it is that this is intended to be used.