- 
                Notifications
    You must be signed in to change notification settings 
- Fork 200
Use PDFsharp with .NET Framework 4.6.2
        Stefan Lange edited this page Jul 4, 2024 
        ·
        3 revisions
      
    I cannot remember why we set the PDFsharp .NET Framework version to 4.7.2. Maybe because we use this version in one of our internal projects. However, PDFsharp works fine with .NET Framework 4.6.2 and starting with PDFsharp 6.2.0 preview 1 we will downgrade .NET Framework to this version.
If you stick with a project to .NET Framework 4.6.2 and cannot wait, do the following simple steps to change PDFsharp:
- Clone the latest PDFsharp version 6.1.1 and open it in Visual Studio
- Replace net472 with net462 in all *.csprojand*.nuspecfiles.
- Add (or change) NET462in the following files:
 CompilerServices.csline 56
 FlateDecode.csline 34
- Rebuild the solution or type dotnet buildin your terminal
Use the new NuGet packages with your project.
This procedure is only required for the PDFsharp GDI or WPF build. The Core build relies on .NET Standard 2.0 anyway.