Error Multiple components use the tag 'MenuItem'.

Severity Code Description Project File Line Suppression State

Error Multiple components use the tag 'MenuItem'. Components: Syncfusion.Blazor.Navigations.MenuItem, Syncfusion.Blazor.Navigations.MenuItem CMS C:\G\Case Manager Blazor Edition\CaseManager_SyncFusion\CMS\Pages\Scheduler.razor 159

There seems to be a conflict between my declared Syncfusion.Blazor reference in NuGet and all of these subset packages.

How do I resolve these hundreds of errors.  These all starting appearing after I added the Document and PDF viewer NuGet packages.  Now the errors won't go away....




8 Replies 1 reply marked as answer

GK Gayathri KarunaiAnandam Syncfusion Team September 24, 2021 03:47 AM UTC

Hi Miles,  

We have checked your reported query. We can resolve this issue by using the namespace in the tag to specify which one you want to use. We suggest you to use the full namespace for each component when use same property (MenuItem). Please check the below code snippet. 

<SfMenu TValue="MenuItem"> 
            <Syncfusion.Blazor.Navigations.MenuItems> 
                <Syncfusion.Blazor.Navigations.MenuItem Text = "File" IconCss = "em-icons e-file"> 
                    <Syncfusion.Blazor.Navigations.MenuItems> 
                        <Syncfusion.Blazor.Navigations.MenuItem Text= "Open" IconCss= "em-icons e-open"></Syncfusion.Blazor.Navigations.MenuItem> 
                        <Syncfusion.Blazor.Navigations.MenuItem Text= "Save" IconCss= "em-icons e-save"></Syncfusion.Blazor.Navigations.MenuItem> 
                        <Syncfusion.Blazor.Navigations.MenuItem Separator="true"></Syncfusion.Blazor.Navigations.MenuItem> 
                        <Syncfusion.Blazor.Navigations.MenuItem Text= "Exit"></Syncfusion.Blazor.Navigations.MenuItem> 
                    </Syncfusion.Blazor.Navigations.MenuItems> 
                </Syncfusion.Blazor.Navigations.MenuItem> 
                <Syncfusion.Blazor.Navigations.MenuItem Text = "Edit" IconCss = "em-icons e-edit"> 
                    <Syncfusion.Blazor.Navigations.MenuItems> 
                        <Syncfusion.Blazor.Navigations.MenuItem Text= "Cut" IconCss= "em-icons e-cut"></Syncfusion.Blazor.Navigations.MenuItem> 
                        <Syncfusion.Blazor.Navigations.MenuItem Text= "Copy" IconCss= "em-icons e-copy"></Syncfusion.Blazor.Navigations.MenuItem> 
                        <Syncfusion.Blazor.Navigations.MenuItem Text= "Paste" IconCss= "em-icons e-paste"></Syncfusion.Blazor.Navigations.MenuItem> 
                    </Syncfusion.Blazor.Navigations.MenuItems> 
                </Syncfusion.Blazor.Navigations.MenuItem> 
                <Syncfusion.Blazor.Navigations.MenuItem Text= "Help"></Syncfusion.Blazor.Navigations.MenuItem> 
            </Syncfusion.Blazor.Navigations.MenuItems> 
        </SfMenu> 

For your reference, we have prepared a sample based on this. Please check the below sample link. 


Please check the link and get back to us, if you need further assistance. 

Regards, 
Gayathri K 


Marked as answer

RA Raphael November 1, 2022 01:44 PM UTC

Are you serious?



MG Miles Gibson November 1, 2022 02:18 PM UTC

That is probably because of a naming conflict with another NuGet package.....



YA YuvanShankar Arunagiri Syncfusion Team November 3, 2022 11:38 AM UTC

You are correct, Miles. The issue is because of a naming conflict with another NuGet package. You can use the solution as we stated earlier on September 24, 2021.

If that post is helpful, please consider accepting it as the solution so that other members can locate it more quickly.



MG Miles Gibson November 3, 2022 04:07 PM UTC

Ok I did.  It is not a perfect solution by any means however.



YA YuvanShankar Arunagiri Syncfusion Team November 19, 2022 01:35 PM UTC

Miles, within Syncfusion Blazor component package, we have unique namespace/ tag name for all Syncfusion component. You can use the below link for reference.


API link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.html


We can’t replicate your reported query in our end. Can you please confirm whether you use third party component with Syncfusion component and share the issue reproducible sample or replicate the issue in our attached sample.


Attachment: MenuBarSample_d62f2a30.zip


TG Tom-Brian Garcia December 6, 2023 09:10 AM UTC

Same issue here. As soon as you add NuGet package PdfViewer, you get these errors...


I followed these tutorials to integrate into a project created through Visual Studio Code Syncfusion Blazor helper
https://blazor.syncfusion.com/documentation/pdfviewer/getting-started/web-assembly-application
https://blazor.syncfusion.com/documentation/pdfviewer-2/getting-started/web-assembly-application


And now all Syncfusion types are seen as "duplicated" and with build errors



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team December 7, 2023 11:01 AM UTC

The reported issue will occur while using both Syncfusion.Blazor and Syncfusion.Blazor.SfPdfviewer/Syncfusion.Blazor.PdfViewe packages in the same application. While using the both the Nugets will throw ambiguous errors while compiling the project. So, we suggest you use Syncfusion.Blazor.SfPdfviewer/Syncfusion.Blazor.PdfViewe NuGet packages alone for the Blazor PDF Viewer. If you want to use other Syncfusion Blazor components please check and install Syncfusion Blazor individual NuGet packages. We have shared the documentation for your reference.

 

Documentation Link: https://blazor.syncfusion.com/documentation/nuget-packages/#for-blazor-server-application

 

Note:

 

  • Do not use both Syncfusion.Blazor and Syncfusion.Blazor.SfPdfviewer/Syncfusion.Blazor.PdfViewer packages in the same application. It will throw ambiguous errors while compiling the project. 
  • Do not use both Syncfusion.Blazor and individual NuGet packages in the same application. It will throw ambiguous errors while compiling the project. 

Loader.
Up arrow icon