What's the difference between SDK and Runtime in .NET Core?

前端 未结 11 1268
醉酒成梦
醉酒成梦 2021-01-30 19:24

I\'ve read many articles, including this one, yet I can\'t still figure out what\'s the difference, and they have not explained it either in simple terms or at all.

Can

相关标签:
11条回答
  • 2021-01-30 19:40

    I'm not inventing anything here. Just copy-pasting the definitions from https://www.microsoft.com/net/download

    The software development kit (SDK) includes everything you need to build and run .NET Core applications, using command line tools and any editor (including Visual Studio).

    The runtime includes just the resources required to run existing .NET Core applications. The runtime is included in the SDK.

    0 讨论(0)
  • 2021-01-30 19:40

    adding to stormwild's answer in case you have only the .Net Core Runtime installed you will receive the following output from dotnet --info

    >PS C:\Users\Administrator> dotnet --info
    >
    >Host (useful for support):
    >  Version: 2.2.3
    >  Commit:  6b8ad509b6 
    >
    >.NET Core SDKs installed:
    >  No SDKs were found.
    >
    >.NET Core runtimes installed:
    >  Microsoft.NETCore.App 2.2.3 [C:\Program 
    >Files\dotnet\shared\Microsoft.NETCore.App]
    
    0 讨论(0)
  • 2021-01-30 19:40

    Runtime is enough if we want to run just application on hardware, otherwise to develop and run we need SDK (which includes runtime and tooling).

    0 讨论(0)
  • 2021-01-30 19:41

    Runtime: to run apps

    SDK (Runtime + Tooling): to build and run apps

    0 讨论(0)
  • 2021-01-30 19:41

    When you install SDK you also get runtime in that. Check this below, this is what gets installed when we install SDK.

    The following were installed at C:\Program Files\dotnet • .NET Core SDK 2.2.100 • .NET Core Runtime 2.2.0 • ASP.NET Core Runtime 2.2.0

    0 讨论(0)
  • 2021-01-30 19:42

    In Simple terms, as per my understanding and the reference from the article https://karthikekblog.com/net-core-sdk-vs-runtime-vs-hosting-bundle/

    .NET SDK - This includes everything you need from creating .Net Core application to building, running and publishing the applications. This purely require by development environment, so developers can develop the application from the scratch and build, debug and run the application.

    Runtime - This only has the components requires to run the .NET Core applications. SO this can be installed in server side where you deploy the application and don't require builds and debugs. It required IIS hosting components separately. Instead you can use Hosting Bundle for Windows.

    0 讨论(0)
提交回复
热议问题