获取Vs 2017使用的'dotnet publish'命令

问题描述 投票:0回答:1

在.Net Core + Angular项目中,如何从命令行发布它,获得与VS 2017发布相同的结果?

试着

dotnet发布 - 配置发布 - 运行时win-x64

但是没有得到相同的结果,发现很多dll文件不存在于VS的发布中

谢谢

visual-studio asp.net-core .net-core visual-studio-2017 asp.net-core-2.1
1个回答
3
投票

您需要使用netcoreapp2.1框架发布项目,而不使用--runtime win-x64,如下所示

dotnet publish --framework netcoreapp2.1 --configuration Release

VS 2017中的默认发布设置将针对框架,如下所示

VS 2017 Publish Settings

© www.soinside.com 2019 - 2024. All rights reserved.