我正在尝试为执行以下操作的 dotnet core 2.0 项目设计构建脚本
因为我知道源代码已经在步骤 1-3 中构建和测试,我不想为 nuget 包重建我的代码,所以我指定 --no-build 和 --no-restore
我遇到的困难是在创建包时,因为我没有构建并且输出目录设置为 bin\Publish - pack 命令正在寻找 bin\Debug 目录中的项目。
有没有办法可以设置 dotnet pack 命令以了解在哪里查找已编译的对象?
这是我的构建脚本示例
dotnet clean ..\MySolution.sln -o bin/Publish/
dotnet build ..\MySolution.sln /p:Configuration=Release -o bin/Publish/
dotnet vstest ..\MySolution.UnitTests\bin\Publish\MySolution.UnitTests.dll
dotnet pack --no-build --no-restore ..\MySolution.ConsoleApp\MySolution.csproj -o bin\Publish\Nuget\
....
error : The file 'D:\MySolution.ConsoleApp\bin\Debug\netcoreapp2.0\MySolution.ConsoleApp.runtimeconfig.json' to be packed was not found on disk
Run Code Online (Sandbox Code Playgroud)