This blog explains the procedure to add .NET Core 3.1 and .NET 5.0 custom controls to your Visual Studio toolbox. This custom toolbox controls configuration is supported by Visual Studio via NuGet packages.
There are two methods for configuring custom controls in the Visual Studio toolbox:
Then, use the following command to expand your NuGet package and place it in the NuGet fallback folder (Create a new directory in your disc anywhere to use it as a fallback folder).
nuget.exe add <path to your nupkg> -Source <path to your fallback folder> -Expand
Now, create a config file in the following structure and update the previous NuGet fallback folderpath. Refer to the following code example.
Then, save it in the following location. An example of a config file’s location: Location: %ProgramFiles(x86)%\NuGet\Config\FileName.config Example: C:\Program Files (x86)\NuGet\Config\Syncfusion Toolbox for WPF.config In the previous code,
Syncfusion Toolbox Local NuGet Packages 19.1.0.63 – This is a unique key to identify your package. You can replace it with your own.
C:\Program Files (x86)\Syncfusion\Essential Studio\WPF\19.1.0.63\ToolboxNuGetPackages – This is a fallback folder. You can replace it with the expanded fallback folder from your NuGet package.
In the Visual Studio v16.7 Preview 2 or later, create a .NET Core 3.1\.NET 5.0 project. Then, open the designer page. Now, the toolbox items defined in the tools\VisualStudioManifest.xml file will be displayed in your toolbox.
To work with your controls, double-click or drag and drop one from the toolbox into your designer page.
From our Syncfusion 2021 Volume 1 release onward, we are providing automatic toolbox configuration support for WPF .NET 5.0 controls. You can just download and install our Essential Studio® for WPF setup v19.1.0.54 or later in a .NET 5.0-enabled machine. Then, the Syncfusion WPF .NET 5.0 controls will be automatically listed in the toolbox.
This necessitates manually installing the NuGet packages in each project. Uninstalling the NuGet package, will remove the toolbox items as well.
This type of configuration is project-specific. If installed in a single project, toolbox items will only be listed in that project. They will not be present in other projects.
Conclusion
Thanks for reading! In this blog, we have seen the procedure to add .NET Core 3.1 and .NET 5.0 custom controls to your Visual Studio toolbox. This will populate the required controls in the toolbox and ease the process of development. So, try out these steps and leave your feedback in the comments section given below!
Syncfusion provides 70+ high-performance, lightweight, modular, and responsive ASP.NET Core UI controls such as DataGrid, Charts, and Scheduler. You can use them to improve your application development.
For existing customers, the new version is available for download from the License and Downloads page. If you are not yet a Syncfusion customer, you can try our 30-day free trial to check out our available features. Also, try our samples from this GitHub location.
Balaji Renganathan works as a Technical Product Manager in Installation and Configuration team. Works prominently in implementing and reviewing Installers, Build Process automating and application packaging. Also plays the role of coordinating the products and releases.