Krypton-Suite / Standard-Toolkit

An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET 8 - 9
BSD 3-Clause "New" or "Revised" License
408 stars 62 forks source link

[Bug]: DOT NET 8, Visual Studio 2022 ( 17.10.1 ) Cannot add or drag items to KryptonGroup or KryptonGroupBox in WinForms Designer #1509

Closed MattH-Work closed 5 months ago

MattH-Work commented 5 months ago

Describe the bug Cannot add items to KryptonGroupBox in WinForms Designer

To Reproduce Steps to reproduce the behavior:

  1. Create new Project
  2. Add Form
  3. Add KryptonGroupBox
  4. Try to add any control to groupbox

Expected behavior Expect to be able to add new or drag existing control(s) onto a Group / Groupbox.

Screenshots image

Desktop (please complete the following information):

Additional context Works as expected when using .NET 4.8... Issues occurs on both New & Migrated projects when using .NET 8 WinFormsApp1.zip

giduac commented 5 months ago

Hi @MattH-Work,

Please try this: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/Source/Help/Output/articles/Support/Designer%20Fix.html

Additional background info: https://github.com/Krypton-Suite/Standard-Toolkit/discussions/684

All the nifty stuff in the IDE designer only works with net48 included in the target frameworks.

giduac commented 5 months ago

@Wagnerp,

Please assign to me. Thanks.

PWagner1 commented 5 months ago

@giduac Done

MattH-Work commented 5 months ago

Hi @MattH-Work,

Please try this: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/Source/Help/Output/articles/Support/Designer%20Fix.html

Additional background info: #684

All the nifty stuff in the IDE designer only works with net48 included in the target frameworks.

Tried it, now getting the following error " Could not resolve mscorlib for target framework '.NETFramework,Version=v4.8.1'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted. "

giduac commented 5 months ago

@MattH-Work

A simple program sample please ? Forgot that it was already included...

giduac commented 5 months ago

Hi @MattH-Work,

First: Your .vbproj file which should (and possibly already does) contain:

<TargetFrameworks>net48;net8.0-windows</TargetFrameworks>

Second: You are missing an assembly reference in the project, to mscorlib.

image

And then enter mscorlib in the search box and check it:

image

MattH-Work commented 5 months ago

Worked like a charm

I had originally just added ' net48 ' to the existing' TargetFramework>net48;net8.0-windows</TargetFramework '

I hadn't registered that the two TargetFramework references are now plural TargetFrameworks>net48;net8.0-windows</TargetFrameworks

Secondily, I tried adding a reference to mscorlib but the ' Add > Assembly Reference ' was missing, hence not being able to self fix the issue I needed to remove my existing form ( blank form, part of my template, not an issue ), add the reference to mscorlib then add a new form back in

Cheers

giduac commented 5 months ago

Nice @MattH-Work !

Looks like u are a happy customer :)

If so please close the ticket, thanks.

MattH-Work commented 5 months ago

Closed, thanks