Issue after migrating to Wisej 4 related to System.Drawing usage? or Other?

0
0

Hi,

I have a solution with several projects, including a Dashboard built with Wisej 4 – Net 9.0, and a Library project that I use to generate menu items to be added to the NavigationBar control in the Dashboard.

I’ve significantly simplified the project here just to clearly illustrate the issue. This is one of several problems arising after the upgrade, apparently related to the use of the System.Drawing namespace.

For context, the same project worked perfectly fine with .NET 7 and Wisej 3.

In the “Dashboard” project, within the form located at Views/frmMainPage.cs, on line 28, I have the following code:

var appProto = Application.Services.GetService<AppProtocolloDescriptor>();
var mnuItmProto = appProto.GetMenu();
navBar.Items.Add(mnuItmProto);

The AppProtocolloDescriptor is registered in Setup.cs, and I’m simply retrieving a NavigationBarItem to add to the navBar control in the form.

The AppProtocolloDescriptor class is registered in Setup.cs, and I’m simply retrieving a NavigationBarItem to add to the navBar control.

When running the Dashboard project, I get a runtime error — something is trying to access System.Windows.Forms, but it’s unclear which component or library is triggering it.

My project, like many medium-sized applications, relies heavily on shared libraries, and this issue is currently preventing the migration to Wisej 4.

I’m attaching a .zip file with the simplified project and a screenshot showing the exact error message.

Any help or insight on how to resolve this would be greatly appreciated.

Thank you in advance!

 

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.