OPC Data Client and NuGet: The What, Why, and How

5 min read

Feb 8, 2024 2:00:00 PM

Software Toolbox has been a fixture in the automation industry since 1996, offering software tools and components from project conception to completion. Our expert staff is committed to helping customers leverage current technologies while offering ways to enhance or expand systems and approaches to achieve even greater returns. When it comes to our OPC Data Client Development Toolkit, that promise remains the same, and we want to help you make the best decisions for your development workflow.

The OPC Data Client has offered the usage of NuGet packages since 2016 as an alternative to adding assembly references via the components when writing custom OPC client applications. As our users have moved towards the use of NuGet, we made this a requirement for .NET Framework beginning with our V2022.2 release. In this blog post and accompanying video, we will cover what NuGet is, when to use it, and how to use it if it makes sense for your requirements.

What is NuGet, and why use it?

NuGet (www.nuget.org) is the package – or dependency – manager for .NET. When you use NuGet to install a package, it copies the library files to your solution and automatically updates your project – this covers adding references, changing the configuration files, and more! When you remove a package, NuGet reverses whatever changes it made so that no clutter is left.

NuGet is primarily a tool for resolving build-time dependencies and can make dependency management much simpler. If you’re using the OPC Data Client NuGet packages directly instead of the toolbox components, updating the version in use is as easy as updating the NuGet packages – no need to remove and re-add the components and references, or reinstall anything.

OPC Data Client and NuGet

The OPC Data Client NuGet packages are hosted in the NuGet Gallery – the central package repository used by most package authors and consumers. However, it is important to mention that you won’t find the NuGet packages under the OPC Data Client name. The NuGet packages for OPC Data Client are instead called ‘OpcLabs.QuickOpc’, which matches the component name. Software Toolbox has recently celebrated 20 years of partnership with OPC Labs, and we have had much success establishing the QuickOpc solution in the North American market and other regions under the OPC Data Client white label.

List of available NuGet packages used by OPC Data Client

  • OpcLabs.QuickOpc/opclabs_quickopc: OPC client and subscriber components for all environments and project types.
  • OpcLabs.QuickOpc.Forms: Components that are specific for Windows Forms (can be partially used from WPF as well).
  • OpcLabs.QuickOpc.Sample.CS: Console-based OPC Data Client examples in C# (source code).
  • OpcLabs.QuickOpc.Sample.VB: Console-based OPC Data Client examples in VB.NET (source code).

While the OPC Data Client NuGet packages make downloading the entire Setup unnecessary, if you want full coverage of all features, you would be better off installing the full product using the Setup program. Here are the differences between the two distribution forms.

What is included in the NuGet packages:

  • Runtime assemblies for all OPC specifications and programming models (for .NET Framework and .NET 6+ target platforms)
  • User interface components (OPC browsing dialogs and browsing controls for Windows Forms)
  • IntelliSense support (XML comments)
  • Examples in LINQPad. This means that whenever you reference one of the OPC Data Client NuGet packages in LINQPad, LINQPad will automatically add the OPC Data Client examples under its “Samples” tab

What is only available from the Setup program or Elsewhere

These items are available online through the full installer or by contacting Software Toolbox Support:

  • Support for COM development (VB6, PHP, Excel, Delphi and similar tools).
  • Documentation and Help
  • Visual Studio integration, including Live Binding design-time support (codeless creation of OPC applications)
  • Examples and Demo applications, Bonus
  • OPC Data Access simulation server, test tools
  • License Manager utility
  • Excel Option

In runtime, all OPC Data Client user interface features (such as controls, dialogs, and live binding; Windows Forms and WPF) and nonvisual components are supported both under .NET Framework and .NET 6+. However, it is important to note that "designing" them in Visual Studio – including tasks like dragging from the Toolbox and configuring in the Properties window – is only possible in .NET Framework projects. In order to achieve visual design for .NET 6+ projects, the developer can make two project files over the same set of source files, one targeting .NET Framework and one targeting .NET 6+, and use the project that targets .NET Framework for visual design tasks.

Video Tutorial: OPC Data Client & NuGet Packages in Action

The video below is intended as a quick guide on using OPC Data Client’s NuGet packages, showing how to add NuGet packages to your Visual Studio solutions, how to switch to the PackageReference mode, and what to do if you also want to use the OPC Data Client’s toolbox components.

To summarize, in this video, we covered:

  1. How to add NuGet packages to your Video Solutions
  2. How to switch to the PackageReference model
  3. How to use OPC Data Client with the NuGet packages

IMPORTANT: You will need to use .NET Framework 4.7.2 or later, or .NET 6 or 7 for this to work. If you do not see the packages in the NuGet Package Manager, double check your project's .NET settings. NuGet Packages are not available for COM development, using the Excel Platform, or within Powershell.

If you already have a license for OPC Data Client and are using the NuGet packages, you will need to embed your license into the project as outlined here in the OPC Data Client help file.

If you are new to OPC Data Client and do not have a license, the NuGet packages will work on a 30 minute demo timer which will start once connected to an OPC Server. Check out our Introduction to No Code and Low Code OPC Client Development training for help getting started. If you are interested in purchasing a license, you can order online or request a quote.

No matter your experience as a developer, your familiarity with the OPC Data Client toolkit, or with Software Toolbox in general, we hope you were able to learn something from this blog post. Our technical team is available Monday-Friday, 8AM-5PM Eastern Time and are eager to help you achieve your OPC Client development needs. We can be reached via phone at 1-704-849-2773 or by email at support@softwaretoolbox.com.

Ready to get started with OPC Data Client? Download a free trial.

OPC Data Client Download Trial



Zachary Parham
Written by Zachary Parham

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback and questions on posts are always welcomed - just use the area at the bottom of any post.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all