问题
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.
回答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 (:
回答2:
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>
Ref: https://github.com/dotnet/coreclr/issues/13542
回答3:
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.
来源:https://stackoverflow.com/questions/47438318/restart-needed-after-installing-net-core-runtime-and-sdk