步骤
请查看dotnet pack了解详情
dotnet build /p:SourceLinkCreate=true -v:n -c:Release -p:ci=true
dotnet pack -v:n -c=Release --no-build --include-source --include-symbols --output .\bin
结果:未创建包
如果你添加任何其他依赖项,它代替xunit,例如NUnit和测试框架,或者Newtonsoft.Json。我也尝试过使用msbuild命令,结果相同
我有什么遗漏,或者是一个错误?
答案 0 :(得分:6)
This github issue表示行为是设计的,您的图书馆需要.csproj中的IsPackable
设置:
<Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>true</IsPackable>
...