Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Menu Class is missing in .NET Core 3.1

I'm developing a task tray application in .NET Core, and I want to create a simple menu to access the application features. However, the required Menu class is not available in the System.Windows.Forms namespace.

The official documentation shows that control is available Menu Class.

How to get the class?

like image 264
jnovacho Avatar asked Mar 14 '26 05:03

jnovacho


2 Answers

As per this, Menu is no longer available in .NET Core 3.1

https://learn.microsoft.com/en-us/dotnet/core/porting/winforms-breaking-changes

The following types are no longer available:

Menu

The recommended action is also listed there.

For Menu, you can either use: ToolStripDropDown or ToolstripDropDownMenu.

For MainMenu, you can use: MenuStrip

For MenuItem, you can use: ToolstripMenuItem

like image 180
Gauravsa Avatar answered Mar 15 '26 21:03

Gauravsa


The documentation is wrong. The Menu class have been deprecated and is no longer available in the .NET Core framework. As per this github issue.

To create a Menu it is required to use the Menu Strip Class.

like image 44
jnovacho Avatar answered Mar 15 '26 19:03

jnovacho



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!