Deploying .Net core console application to Debian server

前端 未结 3 527
Happy的楠姐
Happy的楠姐 2021-01-19 07:11

I have some problem with deploy simple .Net core console application to linux server.

I\'ve created simple console Hello world application this way:

         


        
3条回答
  •  伪装坚强ぢ
    2021-01-19 07:29

    --self-contained means that you dont need to have installed .Net Core on your target machine because all of the needed components are in the release folder

    Second thing is duplicating parameters because -r debian.8-x64 setting to true --self-contained (in other words you dont need --self-contained after you set a runtime identifier)

    Finally try dotnet restore before publish. Then make sure you copying right thing from ./bin/[configuration]/[framework]/[runtime] ( ./bin/[configuration]/[framework]/ is for a framework-dependent deployment). You can even set output folder manually by parameter -o (for example dotnet publish -c release -r debian.8-x64 -o copyme and copy copyme to your "linux server")

提交回复
热议问题