I have some problem with deploy simple .Net core console application to linux server.
I\'ve created simple console Hello world application this way:
You are copying the wrong stuff for deployment. When you dotnet publish
, you should use the contents of the publish
dir. For your case, it should be release/netcoreapp2.0/debian.8-x64/publish/
.
If you use the non-publish directory (release/netcoreapp2.0/debian.8-x64/
), it will assume you want to run your project in development mode, and expects to use assets from the local nuget cache, which will most likely be missing on your deployment machine.
FWIW, you are doing a few things very strangely. First, you need to decide if you want to really use self-contained deployments or not. If you are, you dont even need dotnet installed on the machine you are trying to deploy on.