QuestPDF / QuestPDF

QuestPDF is a modern open-source .NET library for PDF document generation. Offering comprehensive layout engine powered by concise and discoverable C# Fluent API. Easily generate PDF reports, invoices, exports, etc.

Home Page:https://www.questpdf.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuestPDF.Previewer 2024.3.0-rc and .NET8 - can't install package

ZANZAAA opened this issue · comments

Impossible to install the package QuestPDF.Previewer 2024.3.0-rc in any project targeting donet8.0

image

To Reproduce
Tested on VS2022 Version 17.8.6
ConsoleApp, Razor App, Blazor Web App

donet8 seems to be supported based on https://www.nuget.org/packages/QuestPDF.Previewer/2024.3.0-rc#supportedframeworks-body-tab

Instead of using nuget package manager like you do with QuestPDF, you must use

dotnet tool install QuestPDF.Previewer --global 

for QuestPDF.Previewer.

As further information, when I attempt to use Nuget package manager to install, I get the same result on 2024.3.0 using OOB ASP.NET Core MVC project (no config):

Severity	Code	Description	Project	File	Line	Suppression State
Error	NU1202	Package QuestPDF.Previewer 2024.3.0 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package QuestPDF.Previewer 2024.3.0 supports: net8.0 (.NETCoreApp,Version=v8.0) / any	WebApplication1	C:\source\repos\WebApplication1\WebApplication1\WebApplication1.csproj	1	

.NET 6 and 8 is installed:
image
image

Attempt to install via nuget package manager fail if the project is set to .NET 6, .NET 8, or multitarget .NET 6 and .NET 8.

Indeed, the QuestPDF.Previewer application should be installed as a global dotnet tool, rather than as a dependency in your project.

@scottjohnstone You are right 😄 This is a correct way of installation:

dotnet tool install QuestPDF.Previewer --global