The type 'RectangleF' exists in both 'Syncfusion.Pdf.UWP, and 'System.Drawing.Primitives, Version=4.2.0.0

Hi,

When i use RectangleF it gives an error:

The type 'RectangleF' exists in both 'Syncfusion.Pdf.UWP,  and 'System.Drawing.Primitives, Version=4.2.0.0

How can i resolve this?. 

I have tried the method give in thread 133540.  but when i click on the Syncfusion.Pdf.UWP reference to check its properties and give it aliases there is nothing there. 




As you can see there is nothing in the properties of the assembly.



5 Replies

SK Sasi Kumar Sekar Syncfusion Team May 24, 2018 05:13 PM UTC

Hi Abeer,

 

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>

 

Refer the adding namespace to alias from the forum 133540, rest of the changes are same. Kindly try the suggestion in your side and let us know whether its resolve issue.

 

Regards,

Sasi Kumar S. 



AB Abeer May 24, 2018 07:52 PM UTC

Yes this solution works.

Thank you for your help. 



SK Sasi Kumar Sekar Syncfusion Team May 25, 2018 04:25 AM UTC

Hi Abeer, 
  
Thanks for your update, please let us know if you need further assistance on this. 
  
Regards, 
Sasi kumar S. 



AB Abeer May 28, 2018 06:30 PM UTC

OK, i ran into another issue. 

I have placed a  PdfViewer and with its relevent namespace in xaml but VS raises some errors:
1.The type or namespace name 'Parsing' does not exist in the namespace 'Syncfusion.Pdf' (are you missing an assembly reference?)
2. The type or namespace name 'PdfDocumentBase' does not exist in the namespace 'Syncfusion.Pdf' (are you missing an assembly reference?)


so,  how can i give alias in xaml namespace 




SK Sasi Kumar Sekar Syncfusion Team May 29, 2018 09:26 AM UTC

Hi Abeer, 
 
Thank you for your update. 
 
We suggest you to set the alias name in *.csproject as “global,Syncfusion” to resolve the xaml namespace issue. Please find the code snippet below for your reference.  
<Target Name="ChangeAliases" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences"> 
        <ItemGroup> 
            <ReferencePath Condition="'%(FileName)' == 'Syncfusion.Pdf.UWP'"> 
                <Aliases>global,syncfusion</Aliases>               
      </ReferencePath>                     
    </ItemGroup> 
 
Kindly try our suggestion and let us know your result. 
 
Regards, 
Sasi Kumar. 


Loader.
Up arrow icon