Restart needed after installing .NET Core Runtime and SDK?

风流意气都作罢 提交于 2021-01-27 05:07:24

问题


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

  1. x64 Installer (SDK)
  2. x64 Installer (Runtime)
  3. 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.

  1. Install .NET Core Runtime
  2. Deploy a windows service.
  3. You will notice that the command line in the windows service will be "dotnet "
  4. Start the service. It will fail because it cannot find the tool "dotnet".
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!