Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (150).NET Core  (25)Angular  (46)ASP.NET  (48)ASP.NET Core  (61)ASP.NET MVC  (84)Azure  (28)Blazor  (84)DocIO  (19)Essential JS 2  (68)Essential Studio  (162)Flutter  (97)JavaScript  (146)Microsoft  (101)PDF  (57)React  (32)Succinctly series  (120)Syncfusion  (464)TypeScript  (30)Uno Platform  (2)UWP  (4)Vue  (26)Webinar  (21)Windows Forms  (54)WPF  (113)Xamarin  (124)XlsIO  (24)Other CategoriesBarcode  (4)BI  (29)Bold BI  (3)Build conference  (6)Business intelligence  (53)Button  (4)C#  (105)Chart  (48)Cloud  (9)Company  (445)Dashboard  (6)Data Science  (3)Data Validation  (3)DataGrid  (41)Development  (248)Doc  (7)DockingManager  (1)eBook  (91)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (19)Extensions  (12)File Manager  (4)Gantt  (8)Gauge  (6)Git  (4)Grid  (26)HTML  (9)Installer  (2)Knockout  (2)LINQPad  (1)Linux  (1)M-Commerce  (1)Metro Studio  (11)Mobile  (205)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (21)Performance  (5)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (5)Road Map  (9)Scheduler  (23)SfDataGrid  (8)Silverlight  (21)Sneak Peek  (16)Solution Services  (2)Spreadsheet  (7)SQL  (7)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (9)Tips and Tricks  (54)UI  (113)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (1)Visual Studio  (18)Visual Studio Code  (10)Web  (189)What's new  (120)Windows 8  (19)Windows App  (1)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
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:

Share on twitter
Share on facebook
Share on linkedin
Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top