Easily Add .NET Core 3.1 and .NET 5.0 Custom Controls to Visual Studio Toolbox
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (173).NET Core  (29).NET MAUI  (199)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (211)BoldSign  (13)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (63)Flutter  (132)JavaScript  (219)Microsoft  (118)PDF  (80)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (892)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (50)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (127)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (62)Development  (618)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (37)Extensions  (22)File Manager  (6)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (497)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (42)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (379)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (17)Web  (582)What's new  (319)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Easily Add .NET Core 3.1 and .NET 5.0 Custom Controls to Visual Studio Toolbox

Easily Add .NET Core 3.1 and .NET 5.0 Custom Controls to Visual Studio Toolbox

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:

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:

  1. First, create a NuGet package that includes your custom assembly as well as the tools\VisualStudioManifest.xml 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.

    <?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 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.

Syncfusion WPF UI controls in VS 2019 toolbox tab
Syncfusion WPF UI controls in VS 2019 toolbox tab

Reference

Refer to the following user guide documentation:

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 that includes your custom assembly as well as the tools\VisualStudioManifest.xml 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.

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 such as DataGridCharts, 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.

You can also contact us through our support forumDirect-Trac, or feedback portal. We are always happy to assist you!

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed