dotnet / dotnet/winforms

How to fix the issue: "The following controls were successfully added to the toolbox but are not enabled in the active designer"

Open
#8,077 2 comments 2 reactions 2 assignees Claimed by @merriemcgaw View on GitHub
:books: documentation area-VSDesigner
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

### Environment

Visual Studio 2022 (Version 17.3.6).
OS: Windows 10 PRO (Version 21H2)

### .NET version

.NET 6.0

### Did this work in a previous version of Visual Studio and/or previous .NET release?

Yes. I can download and run its source in Visual Studio 2022 (the latest version).
The .csproj showed its target:
net5.0-windows;net40
Library

### Issue description

My IDE:
Visual Studio 2022 (Version 17.3.6).
I want to port one custom control from this repo:
https://github.com/dwmkerr/consolecontrol
According to suggestions of the author, I simply import the custom control dll file:
consolecontrol.dll to toolbox in one C# WinForms app target .NET 6.0; actually, I also tried this with C# Winforms app target .NET 5.0.
The repo supported .NET 5.0, but if I install NUGET package:
PM> Install-Package ConsoleControl -Version 1.3.0
I got warning like:
Warning NU1701 Package 'ConsoleControl 1.3.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.

But if I just add reference to consolecontrol.dll in one C# WinForms project, when I open Forms Designer, and tried to add a new tab in toolbox, and choose items for toolbox, I can see the following message:
The following controls were successfully added to the toolbox but are not enabled in the active designer.
Even it seems not an error, but the result is: I can't see such item (custom control: consolecontrol) appear in toolbox, therefore, I can NOT drag and drop one onto Form1.
Please advise, how can I fix this issue: The following controls were successfully added to the toolbox but are not enabled in the active designer?
Thanks,

### Steps to reproduce

Download file from:
https://github.com/dwmkerr/consolecontrol.git
Unzip it, and find consolecontrol.dll, then add reference to your WinForm project.
Try to add it to Form Designer in Form1, inside toolbox, add new tab "ConsoleControl", then chosse items, browse to consolecontrol.dll file.
Then click OK to add this custom control to toolbox in Form designer, you will see the information:
The following controls were successfully added to the toolbox but are not enabled in the active designer

### Diagnostics

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.