'Restart needed after installing .NET Core Runtime and SDK?
We're about to deploy a netcore 2.0 application on production, but we need to install .NET Core Runtime and SDK first. Is a restart needed for the installation to take effect? Since it's production, we don't want that to happen.
Solution 1:[1]
We installed the following from here
- x64 Installer (SDK)
- x64 Installer (Runtime)
- Windows Server Hosting (Runtime)
There was no need to restart the machine and nothing blew up (:
Solution 2:[2]
If you are creating a Windows Service using the .NET Core SDK (Microsoft.Extensions.Hosting.WindowsServices) and deploying it in the target machine you need a restart (atleast a log off depending on the application you are running). Here is what happens.
- Install .NET Core Runtime
- Deploy a windows service.
- You will notice that the command line in the windows service will be "dotnet "
- Start the service. It will fail because it cannot find the tool "dotnet".
- This is because the service control manager (services.msc) is not aware of the dotnet command being added to the path. So you can either do a log off (or)restart to make sure things work.
Solution 3:[3]
You could just install Windows Server Hosting Bundle without SDK on your production machine (actually it should be).
But then you'll get 502.3 error, and you could add a element as follows into {YourProject}.csproj file, and then it'll work like a charm.
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Solution 4:[4]
With respect to either:
- .NET 6.0 Desktop Runtime (v6.0.2) - Windows x64 Installer Link
- .NET 6.0 Runtime (v6.0.2) - Windows x64 Installer Link
... a reboot is not required.
I didn't have time to test:
- ASP.NET Core 6.0 Runtime (v6.0.2) - Windows Hosting Bundle Installer Link
- ASP.NET Core 6.0 Runtime (v6.0.2) - Windows x64 Installer Link
... but agree with @MuqeetKhan that you should ideally have both a dev && testing lower environment before performing a production install. (Though, I also understand with smaller co's, that due to constraints & battles lost; this may not be possible.)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Caloyski |
| Solution 2 | Soundararajan |
| Solution 3 | John_J |
| Solution 4 | George 2.0 Hope |
