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. Image for the cookie policy date
close icon

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

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

10 Replies

SK Sasi Kumar Sekar Syncfusion Team 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. 



TK Thomas Kison 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?


SK Sasi Kumar Sekar Syncfusion Team 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.  



DP Dhruval Patel 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.



TK Thomas Kison 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>


SK Sasi Kumar Sekar Syncfusion Team 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. 



AS Alexander Schröders 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



SS Sathish Sivakumar Syncfusion Team 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  




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

Hi Sathish,

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

Best Regards
Alexander


GR Gayathri Ramalingam Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon