PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

PDFSharp for PDF format not working in Release mode
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2452
Page 1 of 1

Author:  basena [ Thu May 16, 2013 7:16 am ]
Post subject:  PDFSharp for PDF format not working in Release mode

When we build our solution (with inclusive of PDFSharp-XPS and PDFSharp-WPF projects) in "RELEASE" mode, export PDF is not working fine. Do you have any hard coded words like "Debug" and "Release" modes in code? How to make this work in "Release" mode also? Working fine with Debug mode.

Author:  Thomas Hoevel [ Thu May 16, 2013 8:39 am ]
Post subject:  Re: PDFSharp for PDF format not working in Release mode

The code may contain conditionals (e.g. "#if DEBUG"), but both builds should behave the same way.
Normally "#if DEBUG" is used for additional checks and assertions only.

See also:
viewtopic.php?f=2&t=832

Author:  basena [ Thu May 16, 2013 9:23 am ]
Post subject:  Re: PDFSharp for PDF format not working in Release mode

Thanks for your quick response.

So if both the builds should behave same way, wondering like what is the problem then when I select Solution Configuration as RELEASE instead of Debug and app is not working fine. What should I do now to make my solution work fine with PDFSharp dlls in RELEASE mode also?

I am using PDFSharp, WPF and version is 1.31.1789

Thanks in advance

Author:  Thomas Hoevel [ Thu May 16, 2013 9:58 am ]
Post subject:  Re: PDFSharp for PDF format not working in Release mode

basena wrote:
app is not working fine
What is the difference between "working fine" (DEBUG) and "not working fine" (RELEASE)?
Did you try "Rebuild All"?

Author:  basena [ Thu May 16, 2013 11:20 am ]
Post subject:  Re: PDFSharp for PDF format not working in Release mode

What is the difference between "working fine" (DEBUG) and "not working fine" (RELEASE)?
Did you try "Rebuild All"?

Working fine(Debug) means, when I select "Solution Configuration" as RELEASE and build my solution, I could see there is a decrement in the size of PdfSharp.Xps.dll and PdfSharp-WPF.dll and in a way my requirement is not working properly but when I build my whole solution in DEBUG, mode I could see the increase in the size of PDFSharp dlls, in a way which is making to work my requirement fine with Debug mode. you can see the screen shots(PDFSharp_Size_DebugMode1.png and ProjectSolution_ReleaseMode1.png) of the same in difference in the size from Debug to Release. So my worry is like, in RELEASE mode, whether PdfSharp.Xps.dll and PdfSharp-WPF.dll are including all the required projects internally it is referring to (as I could see the difference in the size of the dlls). And looking for some solution to fix this issue like change in the size of the DLLs in both Debug and Release mode.

For the moment I have changed only PDFSharp projects into Debug (even my all my other projects in solution are under Release, find them in screenshot ProjectSolution_ReleaseMode1.PNG) and getting the project worked with installer (Exe). But I know I shouldn't be doing like this when my solution is in RELEASE mode, all the projects should be made in RELEASE but not like some in Release and some in Debug mode as attached screenshot.

So please provide a solution to make PDFSharp to include all the required projects internally when we build in Release mode also.

Attachments:
PDFSharp_Size_ReleaseMode1.png
PDFSharp_Size_ReleaseMode1.png [ 7.05 KiB | Viewed 6174 times ]
PDFSharp_Size_DebugMode1.png
PDFSharp_Size_DebugMode1.png [ 8.83 KiB | Viewed 6174 times ]
ProjectSolution_ReleaseMode1.png
ProjectSolution_ReleaseMode1.png [ 55.21 KiB | Viewed 6174 times ]

Author:  Thomas Hoevel [ Thu May 16, 2013 12:14 pm ]
Post subject:  Re: PDFSharp for PDF format not working in Release mode

We use the Release build of PdfSharp-WPF.dll and it works fine.
PdfSharp.Xps.dll is a beta version provided as is. You have the complete source code and if it requires modifications to get a Release build then you can make these modifications.

If you get error messages (compile-time or run-time) then show them and maybe we can help you.

So far I only know that the Release build is smaller and "not working fine" - whatever that may mean. Sorry, I can't help you with the information you provided so far.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/