Reputation:
I'm going to develop my app on the same machine which will be the target machine. I installed the SDK. Do I need to install the Runtime too?
Upvotes: 5
Views: 4055
Reputation: 730
If you're running ASP.NET Core apps in IIS, you may need the Runtime install.
We installed just the SDK for Core 2.2 on a Windows Server 2016. Running an ASP.NET Core app via IIS there returned a 500 server error. We then installed the Runtime, and the app worked fine. The Hosting Bundle component of the Runtime installs the ASP.NET Core IIS Module, which links up IIS to the .NET Core app. At least in our case, installing just the SDK did not install that module, whereas the Runtime did.
Upvotes: 2
Reputation: 15223
No.
The .NET Core runtime includes a Virtual Machine (aka CoreCLR) and implementations of libraries (aka CoreFX).
The .NET Core SDK contains compilers and various other toolings to compile your code so it can be executed. The .NET Core SDK contains at least one version of the runtime already: it is itself written in C# and needs a .NET Core runtime to run.
If you want to target some other version of the runtime than the one included with .NET Core SDK, then you will have to install that one separately.
As an example, if you download the .NET Core 2.1.401 SDK, you will get the .NET Core 2.1.3 runtime. If you want to target (for some reason) .NET Core 2.0 runtime, then you will need to install that separately.
(Warning: You dont actually want to target 2.0. It will be out of support in a couple of months while 2.1 will be supported for years.).
Upvotes: 5