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!
Hi Tiziano,
Your “Protocollo.Portal” project needs to target both net9.0-windows and net9.0 for it to work as expected.
Otherwise, there’s going to be a mismatch when loading the libraries.
Best Regards,
Alaa
Hi Tiziano,
It’s not something related to your code, but it happens only when the app is running in net9.0-windows.
If you run it in net9.0, it should work just fine.
We’ll continue to investigate the issue on our end and let you know!
Best Regards,
Alaa
Please login first to submit.