We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Targeting 16299: CS0433 The type 'PointF' exists in both Syncfusion.Pdf.UWP and System.Drawing.Primitives

Thread ID:

Created:

Updated:

Platform:

Replies:

144424 Nov 3,2017 07:11 AM UTC May 9,2019 04:56 AM UTC UWP 10
loading
Tags: SfPdfViewer
Carlo Mendoza
Asked On November 3, 2017 07:11 AM UTC

I'm trying to target min/max 16299 (Fall Creators Update) for UWP but I'm running into this error. How can I resolve this?

Severity Code Description Project File Line Suppression State
Error CS0433 The type 'PointF' exists in both 'Syncfusion.Pdf.UWP, Version=15.3460.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' and 'System.Drawing.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' IPAPP8 C:\____\Views\ItemDetailPage.xaml.cs 367 Active

Sasi Kumar Sekar [Syncfusion]
Replied On November 6, 2017 10:14 AM UTC

Hi Carlo, 
 
Thank you for contacting Syncfusion support. 
 
Follow the below mentioned steps in order to overcome the property alias issue:  
  
  1. In the error occurring project right click on the assembly Syncfusion.Pdf.UWP and click properties.
  2. The default ”Aliases” value will be “global” as shown in screenshot below:
  
  1. Change this value to “syncfusion” as shown in screenshot below:
  
4.       Now add the following code change along with namespace and change the existing name space added for Syncfusion into format as mentioned in code snippet below.   
  
  
extern alias syncfusion;  
  
using syncfusion::Syncfusion.Pdf;  
using syncfusion::Syncfusion.Pdf.Graphics;  
using syncfusion::System.Drawing;  
  
Screenshot reference for the same can be found below:  
 
  
 
Note: System.Drawing should be declared under Syncfusion namespace to avoid the error.  
 
Please let us know if the solution which we provided resolves your issue and let us know if you need any further assistance in this.  
 
 
Regards, 
Sasi Kumar S. 


Thomas Kison
Replied On May 24, 2018 07:46 AM UTC

That solution is not working, when using nuget in VS 2017. Is there another solution for that problem?

Sasi Kumar Sekar [Syncfusion]
Replied On May 25, 2018 04:39 AM UTC

Hi Thomas, 
  
Thank you for contacting Syncfusion. 
  
The alias can be added for the nuget package reference using below code snippet. 
Please add below code snippet in *.csproj 
<Target Name="TargetName" BeforeTargets="BeforeTargetName;ResolveReferences"> 
    <ItemGroup> 
      <ReferencePath Condition="'%(FileName)' == 'Syncfusion.Pdf.UWP'"> 
        <Aliases>syncfusion</Aliases> 
      </ReferencePath> 
    </ItemGroup> 
  </Target> 
 
Please refer the previous updated response in this forum for adding namespace to alias in a sample.  
Regards, 
Sasi Kumar S.  


Dhruval Patel
Replied On May 27, 2018 02:51 AM UTC

After applying the last solution, adding the above code snippet in *.csproj, the build failed with "extern alias syncfusion;" was not found error.


Thomas Kison
Replied On May 28, 2018 04:43 AM UTC

Hello Sasi Kumar,

I already tried that solution, but it is not working. 
I found a solution that works very well:
(proposed by gertjvr: https://github.com/NuGet/Home/issues/4989)

Adding the following lines in your csproj-file will solve the problem. It should also work for dependant assemblies.
<Target Name="ChangeAliases BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
    <ItemGroup>
      <ReferencePath Condition="'%(FileName)' == 'Syncfusion.Pdf.UWP'">
        <Aliases>syncfusion</Aliases>
      </ReferencePath>
    </ItemGroup>
  </Target>

Sasi Kumar Sekar [Syncfusion]
Replied On May 28, 2018 09:25 AM UTC

Hi, 
 
@Thomas – Thank you for your update. 
@Dhruval – We have updated the response in the incident created by you, please follow up the incident for further updates. 
 
Regards, 
Sasi Kumar S. 


Alexander Schröders
Replied On May 3, 2019 06:56 PM UTC

Hi,

I used this fix to get the PDF functionality working correctly in my app. I recently added the PDF Viewer control to my application and I again get errors when building my project for release. When I remove this fix and the parts that used PointF I have no problem compiling for release. With this fix I get the errors that the namespaces Parsing and PdfDocumentBase could not be found in "Syncfusion.Pdf".
My guess is that I have to somehow add the other nuget packages that are needed for the PDF Viewer to this alias but I have no idea how to do that. 

Best Regards
Alexander


Sathish Sivakumar [Syncfusion]
Replied On May 6, 2019 09:43 AM UTC

Hi Alexander 
 
Thank you for your patience.  
 
On analyzing this issue, we found that we are getting compilation errors in the sample while using PointF and RectangleF classes in our sample application due namespace conflicts between System.Drawing and Syncfusion.PDF.UWP once upgrade the SDK to v6.0.1 and targeting the application to 16299. We can resolve these compilation errors by adding aliases and extern changes in the application project file and .cs file. Please find the changes from below,  
 
Project file changes:  
 
Please add below aliases changes in the project file.  
<Target Name="ChangeAliases" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">  
    <ItemGroup>  
      <ReferencePath Condition="'%(FileName)' == 'Syncfusion.Pdf.UWP'">  
        <Aliases>global,syncfusion</Aliases>  
      </ReferencePath>  
    </ItemGroup>  
  </Target>  
 
.CS file changes:  
Please add the below code in the namespace declaration place.  
extern alias syncfusion;  
 
Please find the sample by resolving the reported compilation errors in the below link  
 
Regards,  
Sathish  



Alexander Schröders
Replied On May 8, 2019 08:27 PM UTC

Hi Sathish,

thank you very much for your answer. This solved my problem.

Best Regards
Alexander

Gayathri Ramalingam [Syncfusion]
Replied On May 9, 2019 04:56 AM UTC

Hi Alexander, 
 
Thank you for your update. Please let us know if you need any further assistance.  
 
With Regards, 
Gayathri R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon