Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: **Many** Items cannot be Dragged and dropped onto a Form in Designer #92

Closed
Smurf-IV opened this issue May 9, 2021 · 13 comments
Closed
Labels
bug Something isn't working completed This issue has been completed.

Comments

@Smurf-IV
Copy link
Member

Smurf-IV commented May 9, 2021

Describe the bug
Whilst testing #91 reproduction steps in Standard-Toolkit-Demo's I found that many of the toolkit items cannot simple be dragged and dropped onto a from.

Also of those items that have successfully been draged, then they cannot be deleted ! (This may be due to cascade error form the initial designer failures)

To Reproduce
SomeDoNotWork

Expected behaviour
Be able to use designer for *ALL Krypton elements

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <PropertyGroup>
    <TargetFrameworks>net48;net5.0-windows</TargetFrameworks>
    <OutputType>WinExe</OutputType>
    <RootNamespace>Test_Clip_Base</RootNamespace>
    <AssemblyName>Test Clip Base</AssemblyName>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <UseWindowsForms>true</UseWindowsForms>
    <PlatformTarget>AnyCPU</PlatformTarget>
  </PropertyGroup>

Additional context
<ProjectReference Include="..\..\..\..\Standard-Toolkit\Source\Krypton Components\Krypton.Toolkit\Krypton.Toolkit 2019.csproj" />

@Smurf-IV Smurf-IV added the bug Something isn't working label May 9, 2021
@Smurf-IV Smurf-IV self-assigned this May 9, 2021
@Smurf-IV Smurf-IV added the under investigation This bug/issue is currently under investigation. label May 9, 2021
@PWagner1
Copy link
Contributor

PWagner1 commented May 9, 2021

I had the exact same thing happening in a pure .NET project, I don't know if this is a compatibility issue?

@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 9, 2021

I can confirm that the delete error is seen once the an initial "Drag-Drop" error is seen :-(

@PWagner1
Copy link
Contributor

PWagner1 commented May 9, 2021

Are bugs #54, #66 and #71 all interlinked with this one?

@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 9, 2021

Not sure #66 is as that is a different error (Root cause might be the same tho'...)
I have taken 54 and 71 as part of this investigation..

@Smurf-IV
Copy link
Member Author

Drag'n'Dropped them all 👍
image

@Smurf-IV Smurf-IV added in progress A fix for this issue is in the works. and removed under investigation This bug/issue is currently under investigation. labels May 15, 2021
@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 15, 2021

As shown above.. All is "Good" now when the Form is just a Form.
BUT
Change it to a MultiTarget Project, and it all goes very wrong !!!!!

image

@Smurf-IV
Copy link
Member Author

The following needs to go into a FAQ - As it is a Feature of Visual Studio (16.9.x anyway!)

With the fixes I have done..

It is possible to load all of the Toolkits into a Target application that has a *Single Target framework.

IF the project is MultiTarget: Then it is NOT possible to use some of the Toolkit designer elements !

At least when Linking directly from the source of the Toolkit to the Project (Same will probably apply via NuGet as the Designer will not know which to use first !)

@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 15, 2021

Yay.. Found the workaround.. But it has to go into the Forms project....

  • Close any designer forms you may have open
  • Place the following into the csproj file:
    <ItemGroup>
        <Reference Include="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition="$(TargetFramework.StartsWith('net4'))">
            <SpecificVersion>True</SpecificVersion>
            <Version>4.0.0.0</Version>
            <TreatAsUsed>False</TreatAsUsed>
        </Reference>
        <Reference Include="System.Design, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition="$(TargetFramework.StartsWith('net5'))">
            <SpecificVersion>True</SpecificVersion>
            <Version>5.0.0.0</Version>
            <TreatAsUsed>False</TreatAsUsed>
        </Reference>
        <Reference Include="System.Design, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition="$(TargetFramework.StartsWith('net6'))">
            <SpecificVersion>True</SpecificVersion>
            <Version>6.0.0.0</Version>
            <TreatAsUsed>False</TreatAsUsed>
        </Reference>
        <Reference Include="System.Design" Condition="'$(TargetFramework)' == 'net35'" />
        <!--TODO: Need to specify version here-->
    </ItemGroup>
  • Rebuild.
    • You then MUST close Visual Studio and reopen / reload the solution
  • Open the Form and you will have the designers available to use :-)

Smurf-IV added a commit to Krypton-Suite/Standard-Toolkit-Demos that referenced this issue May 15, 2021
Smurf-IV added a commit that referenced this issue May 15, 2021
- Remove a few compiler warnings
- Mark up some compiler warnings with `TODO:`s
#92
#54
#71
@PWagner1 PWagner1 added this to the November 2021 (Version 6) milestone May 15, 2021
@Smurf-IV Smurf-IV added completed This issue has been completed. and removed in progress A fix for this issue is in the works. labels May 16, 2021
@Smurf-IV Smurf-IV removed their assignment May 16, 2021
@Smurf-IV
Copy link
Member Author

Available August 2021 (Canary)

@Smurf-IV Smurf-IV pinned this issue May 16, 2021
@PWagner1 PWagner1 unpinned this issue May 16, 2021
@Smurf-IV Smurf-IV reopened this Aug 1, 2021
@Smurf-IV Smurf-IV self-assigned this Aug 1, 2021
@PWagner1 PWagner1 changed the title [Bug]: **Many* Items cannot be Dragged and dropped onto a Form in Designer [Bug]: **Many** Items cannot be Dragged and dropped onto a Form in Designer Aug 1, 2021
@Smurf-IV
Copy link
Member Author

Smurf-IV commented Aug 1, 2021

image

@Smurf-IV
Copy link
Member Author

Smurf-IV commented Aug 1, 2021

It's the controls that have a designer that is derived from ParentControlDesigner

@Smurf-IV
Copy link
Member Author

Smurf-IV commented Aug 1, 2021

ParentControlDesigner Class has been moved into System.Windows.Forms.Design.dll since .netCore

Smurf-IV added a commit that referenced this issue Aug 1, 2021
…ent "Pre-Loading" of the wrong system.Designer dll in Multi-Target projects

- Sort out the reference assemblies information to ensure correct loading of controls in designer
- Remove references to V2.0.0.0 of the System.Design when using the `MultilineStringEditor`
- remove nullabel messages caused by `CS8618`
Fixes #92
Smurf-IV added a commit that referenced this issue Aug 1, 2021
then only need to include dlls derived from `ParentControlDesigner`
resolves #92
@Smurf-IV Smurf-IV removed their assignment Aug 1, 2021
@Smurf-IV Smurf-IV closed this as completed Aug 1, 2021
@PWagner1
Copy link
Contributor

PWagner1 commented Aug 1, 2021

Available in build 2108.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed This issue has been completed.
Projects
None yet
Development

No branches or pull requests

2 participants