Aspose.Cells.GridDesktop.GridDesktop Could not load ContextMenu in .Net Core 3.1

WPF project using .net core 3.1, and use the latest version of the nuget package.
But I can’t start the program after compiling, it throws the System.Windows.Markup.XamlParseException in InitializeComponent(), and the Inner Exception:

TypeLoadException: Could not load type 'System.Windows.Forms.ContextMenu' from assembly 'System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

This is where the csproj file is edited:


and the window xaml:


                <WindowsFormsHost Loaded="FrameworkElement_OnLoaded" >
                        <gridDesktop:GridDesktop x:Name="grid"/>

Is there a way to solve this, without changing the program’s framework?

GridDesktop is compiled in .net4 framework.
we haven’t try using it in .net core application.
we will try it and feedback to you

per my test.
the compiled process fail to import the dll in the .net core 3.1 project .
QQ图片20231013144116.png (55.7 KB)

can you share your project sample.

Here is my sample project. (7.2 MB)

I noticed that the dependency package has warnings indicating that it is not supported by .net core.
But in Visual Studio errors list it reports the root cause, which is the obsolete control “System.Windows.Forms.ContextMenu”.

thanks for your sample.
We can see the errors .
The root cause is:
According to the official document that the “ContexrMenu” is not supported in the .Net Core 3.1 & .Net 5.0. (;k(DevLang-csharp)%26rd%3Dtrue&view=netcore-3.1), that ContextMenuStrip replaces ContextMenu.

In addition, the MainMenu, DataGrid, Menu, ToolBar are also removed as deprecated controls.

We will try to fix it.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-54389

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

please try this hotfix . (5.5 MB)

we will publish official release soon.
if you find any issue ,please let us know.

Good job! I changed to referencing this dll and it works fine, provided that the nuget package for System.Windows.Extensions (Version=6.0.0) is additionally installed to ensure that System.Drawing.Common (Version= can be found.

Thank you for your feedback. I’m glad your issue has been resolved. If you have any questions, please feel free to contact us.

The issues you have found earlier (filed as CELLSNET-54389) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

we have published v23.11.0 version.
you can now get through nuget .

And the nuget version doesn’t have to look for additional System.Windows.Extensions, cheers!

ok, that is fine.If you have any questions, please feel free to contact us.