解决 dotnet core 1.x 命令行(cli) 下运行路径错误

环境:

Windows 10,Visual Studio 2017

centos 7,nginx,supervisor,dotnet core 1.1

问题:

在 Linux 配置 supervisor 时,如下命令运行项目会出现各种路径问题,可能涉及一个 work dir 的概念;Windows 同样适用。

只能在项目的当前目录运行 dotnet 才可正常。

command=dotnet /home/wwwroot/www.automan.com/automan.dll

解决:

command=/bin/bash -c "cd /home/wwwroot/www.automan.com && dotnet automan.dll"

 

posted on 2017-09-11 11:16  wuball  阅读(320)  评论(0编辑  收藏  举报

导航