Easily Add .NET Core 3.1 and .NET 5.0 Custom Controls to Visual Studio Toolbox
Tags: csharp, dotnet, productivity
Published: 2021-06-16 14:05:23

---
title: Easily Add .NET Core 3.1 and .NET 5.0 Custom Controls to Visual Studio Toolbox
published: true
date: 2021-06-16 10:47:10 UTC
tags: csharp, dotnet, productivity
canonical_url: https://www.syncfusion.com/blogs/post/easily-add-net-core-3-1-and-net-5-0-custom-controls-to-visual-studio-toolbox.aspx
cover_image: https://www.syncfusion.com/blogs/wp-content/uploads/2021/06/Easily-Add-.NET-Core-3.1-and-.NET-5.0-Custom-Controls-to-Visual-Studio-Toolbox-672x372.png
---

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](https://visualstudio.microsoft.com/ "Link to Visual Studio") via [NuGet](https://en.wikipedia.org/wiki/NuGet "Link to NuGet Wikipedia page") packages.

There are two methods for configuring custom controls in the Visual Studio toolbox:

- [Without manually installing NuGet Packages](#without-manually-installing-nuget-packages).
- [By installing NuGet Packages](#by-installing-nuget-packages).

## Without manually installing NuGet packages

Toolbox items will be automatically populated in the Visual Studio toolbox without the need for each project to have the NuGet packages installed.

It’s as simple as that; follow these steps, as directed by [Microsoft](https://github.com/microsoft/xaml-designer-extensibility/blob/main/documents/toolbox-population.md#toolbox-items-from-unreferenced-nuget-packages "Link to Toolbox items from unreferenced NuGet packages"):

1. First, [create a NuGet package](https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package "Link to Create a package using the nuget.exe CLI documentation") that includes your custom assembly as well as the [tools\VisualStudioManifest.xml](https://docs.microsoft.com/en-us/nuget/guides/create-ui-controls "Link to Creating UI controls as NuGet packages") file.
2. 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` |

3. Now, create a config file in the following structure and update the previous  **NuGet fallback folder**  **path**.  
Refer to the following code example.
```html
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <fallbackPackageFolders>
    <add key="Syncfusion Toolbox Local NuGet Packages 19.1.0.63" value="C:\Program Files (x86)\Syncfusion\Essential Studio\WPF\19.1.0.63\ToolboxNuGetPackages" /> </fallbackPackageFolders>
</configuration>
```
4. 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.
5. 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.
6. 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](https://www.syncfusion.com/blogs/post/whats-new-in-2021-volume-1-essential-studio-installer.aspx#automatic-toolbox-population-for-net-5-framework-in-wpf "Link to What’s New in 2021 Volume 1: Essential Studio Installer blog") controls. You can just [download](https://help.syncfusion.com/wpf/installation-and-upgrade/download "Link to Download WPF Installer documentation") and [install](https://help.syncfusion.com/wpf/installation-and-upgrade/install-using-the-web-installer "Link to installation using Web Installer documentation") 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.

![Syncfusion WPF UI controls in VS 2019 toolbox tab](https://www.syncfusion.com/blogs/wp-content/uploads/2021/06/Syncfusion-WPF-UI-controls-in-VS-2019-toolbox-tab.png)<figcaption>Syncfusion WPF UI controls in VS 2019 toolbox tab</figcaption>

### Reference

Refer to the following user guide documentation:

- [Configure Syncfusion WPF .NET 5.0 controls in the toolbox](https://help.syncfusion.com/common/essential-studio/utilities#configuring-toolbox-for-wpf-net-50-projects "Link to configure toolbox for WPF .NET 5.0 projects documentation").
- [Add custom controls in the Visual Studio toolbox for .NET Core 3.1\NET 5.0 and later using unreferenced NuGet packages](https://github.com/microsoft/xaml-designer-extensibility/blob/main/documents/toolbox-population.md#toolbox-items-from-unreferenced-nuget-packages "Link to Toolbox items from unreferenced NuGet packages documentation").
- [Target framework specific manifests](https://github.com/microsoft/xaml-designer-extensibility/blob/main/documents/toolbox-population.md#targetframework-specific-manifests "Link to TargetFramework-specific manifests documentation"): To learn the suitable target framework for the tools\VisualStudioManifest.xml file.

### Limitations

- The automatic toolbox configuration for .NET Core 3.1 or .NET 5.0 is supported only in Visual Studio v16.7 Preview 2 or later.
- It is now limited to WPF .NET Core projects and packages.

## By installing NuGet packages

You can also get your custom controls in the Visual Studio toolbox by installing the NuGet packages. To do so, follow these steps:

1. First, [create a NuGet package](https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package "Link to create a package using the nuget.exe CLI documentation") that includes your custom assembly as well as the [tools\VisualStudioManifest.xml](https://docs.microsoft.com/en-us/nuget/guides/create-ui-controls "Link to Creating UI controls as NuGet packages documentation") file.
2. Then, install this NuGet package to your WPF project.
3. Now, the toolbox items defined in the **tools\VisualStudioManifest.xml**  file will be displayed in the toolbox.
4. To work with your controls, double-click or drag and drop one into your designer page.

**Note:**  Refer to [configuring custom controls in the toolbox in Visual Studio 2017 v15.0 or later using referenced NuGet packages](https://github.com/microsoft/xaml-designer-extensibility/blob/main/documents/toolbox-population.md#toolbox-items-from-referenced-nuget-packages "Link to toolbox items from referenced NuGet packages documentation").

### Limitations

- 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](https://www.syncfusion.com/aspnet-core-ui-controls "Link to ASP.NET Core UI controls") such as [DataGrid](https://www.syncfusion.com/aspnet-core-ui-controls/grid "Link to ASP.NET Core DataGrid"), [Charts](https://www.syncfusion.com/aspnet-core-ui-controls/charts "Link to ASP.NET Core Charts"), and [Scheduler](https://www.syncfusion.com/aspnet-core-ui-controls/scheduler "Link to ASP.NET Core 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](https://www.syncfusion.com/account/downloads "Link to license and download page of Essential Studio") page. If you are not yet a Syncfusion customer, you can try our 30-day [free trial](https://www.syncfusion.com/downloads "Link to the free evaluation of the Syncfusion Essential Studio") to check out our available features. Also, try our samples from this [GitHub](https://github.com/syncfusion "Link to the Syncfusion examples on GitHub") location.

You can also contact us through our [support forum](https://www.syncfusion.com/forums "Link to the Syncfusion support forum"), [Direct-Trac](https://www.syncfusion.com/support/directtrac/incidents "Link to the Syncfusion support system Direct Trac"), or [feedback portal](https://www.syncfusion.com/feedback/ "Link to Syncfusion Feedback Portal"). We are always happy to assist you!

## Related blogs

- [How to Apply API Versioning in ASP.NET Core](https://dev.to/karthickramasamy08/how-to-apply-api-versioning-in-asp-net-core-3fig-temp-slug-5071663 "Link to How to Apply API Versioning in ASP.NET Core blog")
- [How to Integrate Unit Testing with ASP.NET Core 3.1](https://dev.to/karthickramasamy08/how-to-integrate-unit-testing-with-asp-net-core-3-1-4gmp-temp-slug-1715525 "Link to How to Integrate Unit Testing with ASP.NET Core 3.1 blog")
- [Easily Perform LINQ Mocking to Unit Test ASP.NET Core Application](https://dev.to/syncfusion/easily-perform-linq-mocking-to-unit-test-asp-net-core-application-4f2p "Link to Easily Perform LINQ Mocking to Unit Test ASP.NET Core Application blog")
- [Creating Visual Studio Extensions Using Visual Studio 2019—A Complete Guide](https://dev.to/syncfusion/creating-visual-studio-extensions-using-visual-studio-2019-a-complete-guide-50g "Link to Creating Visual Studio Extensions Using Visual Studio 2019—A Complete Guide blog")