步骤
请检查 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
后果 :未创建包
如果您添加了任何其他依赖项,例如NUnit和测试框架,或Newtonsoft,则可以使用它来代替xunit。Json。我还尝试了使用msbuild命令,得到了相同的结果
我有什么遗漏吗,还是一个bug?
This github issue 表示行为是设计的,您的库需要 IsPackable 正在设置。csproj公司:
IsPackable
<Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="15.0"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> <IsPackable>true</IsPackable> ...