在 asp.net core 发布时,本人先后产生了3个疑问. 1.发布的程序为什么不能在docker容器中运行 当时在window开发环境中发布后,dotnet xxx.dll可以正常运行:但放入docker容器后就报 *.*.deps.json not found 的错误.后根据下面的文章解决了问题:https://www.cnblogs.com/mahidol/p/9064943.html 根据上述文章的结论,因为发布时认为运行的环境中包含必备的库,所以仅发布了项目中的代码与资源. 我的d…
添加Command支持 新建一个ASP.NET Core 项目,打开Program.cs 添加下面的代码: public class Program { public static void Main(string[] args) { BuildWebHost(args).Run(); } public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseConfigurati…