[{"data":1,"prerenderedAt":104},["ShallowReactive",2],{"/2026/07/20-dotnet-pack-didnt-build":3},{"id":4,"title":5,"body":6,"date":95,"description":92,"extension":96,"meta":97,"navigation":98,"path":99,"robots":100,"seo":101,"stem":102,"__hash__":103},"posts/2026/07/20 dotnet-pack-didnt-build.md","20 Dotnet Pack Didnt Build",{"type":7,"value":8,"toc":91},"minimark",[9,18,21,25,27,39,41,48,50,62,68,70,78,80],[10,11,13],"post-title",{":date":12},"date",[14,15,17],"h1",{"id":16},"dotnet-pack-dint-build","Dotnet Pack Din't Build",[19,20],"br",{},[22,23,24],"p",{},"My team is a assigned a small project to build a NuGet package. And since I'm familiar with DevOps practice, I took the initiative to build the CI/CD pipeline.",[19,26],{},[22,28,29,30,38],{},"Our client has a standard pipeline that needs to be incorporated. The standard pipeline stage for NuGet only runs ",[31,32,37],"code",{"className":33},[34,35,36],"bg-gray-200","p-2","rounded","dotnet pack"," and it's failing. The error message indicated that it can't find the dll.",[19,40],{},[22,42,43,44,47],{},"Checking various online documentation and discussion, ",[31,45,37],{"className":46},[34,35,36]," is supposed to do implicit build, so it should have produced the dll.",[19,49],{},[22,51,52,53,61],{},"After couples of back and forth with the engineer over at the client side, I happened to notice the following note at ",[54,55,37],"a",{"className":56,"href":58,"rel":59},[57],"text-blue-600","https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-pack",[60],"nofollow"," page:",[63,64,65],"notes",{},[22,66,67],{},"In some cases, the implicit build cannot be performed. This can occur when GeneratePackageOnBuild is set, to avoid a cyclic dependency between build and pack targets. The build can also fail if there is a locked file or other issue.",[19,69],{},[22,71,72,73,77],{},"And indeed, our project has ",[31,74,76],{"className":75},[34,35,36],"GeneratePackageOnBuild"," since we wanted to make sure that our project indeed produce the package when run locally.",[19,79],{},[22,81,82,83,86,87,90],{},"Removing the ",[31,84,76],{"className":85},[34,35,36]," property then allows  ",[31,88,37],{"className":89},[34,35,36]," to implicitly build the project and produced the dll again.",{"title":92,"searchDepth":93,"depth":93,"links":94},"",2,[],"2026-07-20T00:00:00.000Z","md",{},true,"/2026/07/20-dotnet-pack-didnt-build",null,{"title":5,"description":92},"2026/07/20 dotnet-pack-didnt-build","5Q2CyuZWaWuiL9TJJgEdYwaqn2rRWbUwSLCLIBXGz78",1785167451284]