iTextSharp https://itextpdf.com/ en iTextSharp and UWP https://itextpdf.com/blog/technical-notes/itextsharp-and-uwp <span property="schema:name" class="field field--name-title field--type-string field--label-hidden">iTextSharp and UWP</span> <span rel="schema:author" class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/itext" typeof="schema:Person" property="schema:name" datatype="">iText</span></span> <span property="schema:dateCreated" content="2016-01-28T00:00:00+00:00" class="field field--name-created field--type-created field--label-hidden"><time datetime="2016-01-28T01:00:00+01:00" title="Thursday, January 28, 2016 - 01:00" class="datetime">Thu, 01/28/2016 - 01:00</time> </span> <div property="schema:text" class="wysiwyg-content clearfix text-formatted field field--name-body field--type-text-with-summary field__items"> <p>At the technical support team, we have recently received a number of questions regarding support for the <strong>Universal Windows Platform</strong>. For those not in the know, UWP was designed by Microsoft to improve portability of applications between all possible Windows-style devices. In the older .NET Framework, porting an existing app to a new device family (e.g. wearables, XBox, etc.) is a non-trivial task. UWP aims to solve this problem by introducing a unified backbone that is compatible with all device families, and ensures that an app can be used on all devices that run on a Windows 10 operating system.</p> <p>It turns out that UWP is based on <strong>.NET Core</strong>, which is a new development platform for .NET, similar but not equal to the .NET Framework. The .NET Core and the .NET Framework platforms are not 100% binary compatible, meaning that apps designed for the .NET Framework have a significant risk of not running on .NET Core, and by extension on UWP, without some code changes. More poignantly for iText Software and its customers, <em>libraries</em> that are used by these applications may also be unusable on UWP. Some of our customers and prospects have confirmed that there is indeed a compatibility problem for iTextSharp. The known issues are currently:</p> <ul><li> <p>When adding the iTextSharp DLL as a reference to your UWP solution via NuGet</p> </li> </ul><dl><dt>error message:</dt> <dd>            </dd> <dd><em>iTextSharp 5.5.8 is not compatible with UAP, Version=v10.0</em></dd> <dt>            </dt> <dt>result:</dt> <dd>            </dd> <dd>iTextSharp cannot be added to the UWP project through NuGet</dd> </dl><ul><li> <p>After manually adding the iTextSharp DLL or source code to your UWP project</p> </li> </ul><dl><dt>error message:</dt> <dd>            </dd> <dd>depends on which binary incompatibility is first encountered at runtime. Most frequently, a reflection problem like <em>Could not load type 'System.ICloneable' from assembly 'mscorlib [...]'.</em></dd> <dt>            </dt> <dt>result</dt> <dd>            </dd> <dd>iTextSharp can be added to the UWP project and the build may succeed, but iTextSharp functionality is unusable when running the app.</dd> </dl><p>The engineering team at iText Software is currently researching how to elegantly support .NET Core and UWP, of course without dropping support for the .NET Framework. This is most definitely feasible technically, but we have only begun looking for the most complete solution that suits every relevant .NET version. We of course prefer to avoid duplicating all our source code, because that would introduce the danger that the two repositories go out of sync.</p> <p>This issue has a high priority for us, but we must take care to choose a sustainable path with as little long-term overhead as possible. We will be forced to look at what other leading software libraries have done to address this and other backwards compatibility issues. Fortunately, a similar breaking change has happened before in the .NET ecosystem, with the now obsolete Microsoft Silverlight engine. This rich Internet application framework introduced a lot of incompatibilities – most of them the same as for UWP – with the traditional .NET Framework, so we will start out by looking at what other open source libraries have done to support Silverlight.</p> </div> <div class="field field--name-field-tags field--type-entity-reference field__items"> <div class="field__label">Tags</div> <a href="/tags/itextsharp" property="schema:about" hreflang="en">iTextSharp</a> <a href="/tags/itext-5" property="schema:about" hreflang="en">iText 5</a> <a href="/tags/uwp" property="schema:about" hreflang="en">UWP</a> </div> <span class="a2a_kit a2a_kit_size_25 addtoany_list" data-a2a-url="https://itextpdf.com/blog/technical-notes/itextsharp-and-uwp" data-a2a-title="iTextSharp and UWP"><a class="a2a_button_facebook"><i class="fa-brands fa-facebook-f fa-2x"></i></a><a class="a2a_button_twitter"><i class="fa-brands fa-twitter fa-2x"></i></a><a class="a2a_button_linkedin"><i class="fa-brands fa-linkedin-in fa-2x"></i></a><a class="a2a_button_whatsapp"><i class="fa-brands fa-whatsapp fa-2x"></i></a><a class="a2a_button_email"><i class="fa-solid fa-envelope fa-2x"></i></a></span> <div class="field field--name-field-article-type field--type-entity-reference field__items"> <div class="field__label">Article type</div> <a href="/blog-type/technical-notes" hreflang="en">Technical notes</a> </div> <div class="field field--name-field-related-products field--type-entity-reference field__items"> <div class="field__label">Related products</div> <a href="/products/itext-5-legacy" hreflang="en">iText 5</a> </div> <div class="field field--name-field-main-image field--type-entity-reference field__items"> <div class="field__label">Main image</div> <a href="/resources/media/images/dsf-logo" hreflang="en">DSF Logo</a> </div> Thu, 28 Jan 2016 00:00:00 +0000 iText 1171 at https://itextpdf.com https://itextpdf.com/blog/technical-notes/itextsharp-and-uwp#comments