PdfPig
PdfPig copied to clipboard
NuGet package contains empty UglyToad.PdfPig.Package.dll
The PdfPig NuGet package contains the assembly UglyToad.PdfPig.Package.dll which doesn't contain any code. It doesn't really hurt, but I think this assembly should be removed.
So the reason for this dll is that the document layout analysis dll is dependent on the main pdfpig dll. I didn't want to make the document layout analysis dll the one that got packaged since the library might grow to support multiple top-level dependent projects, for example if it was ever extended to support HTML to PDF.
This empty package dll is something of a hack to support that https://github.com/UglyToad/PdfPig/blob/master/tools/UglyToad.PdfPig.Package/UglyToad.PdfPig.Package.csproj
I understand why the package project exists. But the created NuGet package wouldn't need the dll, right? So the project is just a replacement for a custom .nuspec file. Isn't there a way to exclude the dll from the created NuGet package?
As far as I recall, and it has been a while since I did the original restructure, the idea is you only have to reference/dereference a single dll, the UglyToad.PdfPig,Package.dll which brings in all others in the library, rather than having to reference UglyToad.PdfPig.DocumentLayoutAnalysis.dll and UglyToad.PdfPig.HtmlToPdf.dll (for example).
It simply provides a placeholder for easy use in referencing, but that might not make sense now I type it, I don't recall 🙈
I don't understand that. If I use PdfPig in my project (which I do, thanks for creating it!) I have a <PackageReference> to it in my csproj file. So I reference the package, not individual assemblies of it. And the solution explorer then shows all assemblies that are contained in the package in the "References" node under "compile time assemblies".
So as far as I understand it, nothing would change for package consumers if the file UglyToad.PdfPig.Package.dll wasn't included any more.
Not sure how to fix this and keep the 2-top-level packages design of UglyToad.PdfPig and layout analysis. Not realistically going to change in the next 3 years