I'm building a .Net Core API which will be hosted on a Ubuntu based server. I'm installing the required packages I need on the server i.e. MySQL and Nginx, but I also need to install .Net Core of course for the application to run.

I found a tutorial example of how to setup and configure Nginx to work with the Kestrel server, but it entirely assumes you already have .Net Core installed on the machine it will be deployed on.

The .Net Core website only seems to instruct you to install the SDK, but this is for deployment, not development so it would make sense to install the .Net Core runtime instead, however when doing an apt-cache search dotnet to find the specific package name, I found dotnet-hosting-2.0.0 listed too which is described with "Microsoft .NET Core 2.0.0 Linux Server Hosting".

To sum this up, my question is simply this. To host a .Net Core application, do you use the dotnet-hosting or the dotnet-runtime package for deployment of a .Net Core application?


After further research, I have found that the dotnet-hosting package combines the dotnet-runtime and aspnetcore-store packages. Verified by this Github comment.

The runtime and runtime store are packaged into "Linux Server Hosting" installers with the package name dotnet-hosting-2.0.0.

aspnetcore-store is now by default a required dependency on published ASP.Net Core applications.

By default, ASP.NET Apps are published with a dependency on the runtime store.

So to answer my question directly, dotnet-hosting-x.x.x should be installed when deploying an ASP.Net Core application. This will also eliminate the following error when aspnetcore-store is not installed along with the dotnet-runtime package.

Error: An assembly specified in the application dependencies manifest (APIproject.deps.json) was not found: package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1' path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll' This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml

I have tested the package myself on Ubuntu 16.04 with my application and it is working well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.