Using NuGet with Blue Prism

GeoffHirst
Staff
Staff

34516.jpg

Not everyone who creates automations with Blue Prism may have come across the term, NuGet. In fact, you may have only come across NuGet if you are a code stage creator or, in effect, a NET developer. In this blog, we explore this source of NET packages that can be used in Blue Prism integrations.

NuGet? What’s that then?

When you develop computer software its very useful to have a mechanism with which to create, share and make use of existing code. This code is assembled into packages which are compiled usually as DLLs (dynamic link libraries) along with other content that the projects need to use these packages.

Many languages have these mechanisms, often called repositories. Python has PyPI, Java has JPA, JavaScript has npm and .NET has NuGet.

When you create code with Blue Prism, chances are you are using either C# or VB.NET. So, having access to NuGet is a big benefit. This document aims to answer how to make the best use of NuGet if you are creating Blue Prism code stages.

NuGet exists on the web at https://www.nuget.org. At the time of writing, the landing page looks like this.

34517.png

Almost 300,000 unique packages and many billions of individual downloads make NuGet one of the most popular package repositories on the internet.

The NuGet Package 

This is the unit of download that is provided by the NuGet repository. The file has the extension of nupkg. A short form for NuGet Package. These packages are just zip files and if you change the extension to .zip, you will find that the file can be readily opened and viewed. This allows you to move the package element, specifically the DLLs, to where you need them to be.

Using NuGet

There is no direct way to use NuGet with Blue Prism, however if you like many developers, you create your code-stage code in either Visual Studio, VS Code or JetBrains Rider and use the advantages of those development IDE’s and then transfer your code to Blue Prism when you are satisfied with its functionality. It is in that IDE that you can take advantage of NuGet.

In Visual Studio, it looks like this:

34518.png

The left screen section is showing a set of packages and the right area is showing your solution and whether the selected package is installed there.

The benefit of a package manager, like NuGet, is the ability to make use of functionality that has been created and tested by many other developers. The other win is these packages are generally maintained by this we mean kept up to date and bugs are dealt with and even new features added.

Blue Prism & NuGet

 As an example, let’s use the Prism.Core package. Prism is a framework mainly for building composite applications. If you are familiar with WPF (Windows Presentation Foundation) you will likely be aware of Prism. Please note, it has no connection to Blue Prism, the name is a complete coincidence.

So, here is our example, Prism.Core.

34519.png

So, we have our code-stage code in our IDE and now we are looking to move this over to Blue Prism. We need to get any NuGet package DLLs into a position where Blue Prism can access them.

34520.png

As previously mentioned, NuGet packages are zip files. So, we rename the package with the zip extension and then open it up or extract its contents.

34521.png

                                                  The opened zip (nupkg).

 If we follow the directory chain from the lib folder, down we will eventually find some DLLs.

 34522.png

The Prism.dll is the file that we would like Blue Prism to be able to access and the easiest way to do this is to copy it to the Blue Prism application folder inside of Program Files.

34523.png

 

So, we now make the transition to Blue Prism and provide access to the DLL from there.

34524.png


So, if we open a new Blue Prism object, and then visit the properties of that object we can tell Blue Prism where the DLL is that we want to use. In addition we also tell Blue Prism the specific namespaces that we want to use, show above in the lower part of the image.

Conclusion

So, we have come a long way. We know now about software repositories and what they are and how they are used and what benefits they bring. We have also seen how a NuGet package can be downloaded and made available for Blue Prism to use and how to accomplish this.


#Industry
#InsideRPA
#Product
#DigitalExchange
5 Comments
Great! Thanks for sharing. Could be great in the future have something similar with the Digital Exchange platform to check for updates or different product versions integrated directly with Blue Prism console.

Bye 🙂
Neel1
MVP
this is good !! nicely presented.
 Please can you explain in more details that in which part of Blue Prism, this can be useful and what area can be replaced by nuget pakcg.
how much efficiency this can bring in our typical blue prism automation.
are we going to have few university course in future on this topic?
GeoffHirst
Staff
Staff
Hi Neeraj,
Thank you for your kind word and thank you for using Blue Prism.

The post is aimed at people who are writing code stages in Blue Prism. As Blue Prism code stages make use of .NET languages, NuGet is a source of assemblies that provide additional functionality. As explained in the text, I chose the Prism library as an example, but there are many others all offering functionality that can be used to access services or provide other functionality in your integrations.

NuGet presents some great opportunities with Blue Prism and we hope to be able to expand these in the future.
​Regards
Geoff Hirst
StephanieStrydo
Level 5
Hi, I am trying to install IronPDF (https://www.nuget.org/packages/IronPdf), but after opening the zip it did not have a .dll file. Does that mean it can't be added to Blue Prism?
GeoffHirst1
Level 3
Hi Stephanie,

Thank you for being a SS&C Blue Prism customer and for using Blue Prism.

From what I can see, the ironpdf nuget package has dependencies that look like they actually do all the 'heavy lifting' so to speak.

I created a simple console project in VS2019 and found that when I added IronPDF, it added the following items also.

uccessfully installed 'IronPdf 2022.7.6986' to Scratch
Successfully installed 'IronPdf.Native.Chrome.Windows 2022.7.6922' to Scratch
Successfully installed 'IronPdf.Slim 2022.7.6986' to Scratch

I suggest you might investigate installing the other packages also and see if that helps you accomplish your goal. Please come back to me here if you need any further assistance.

Once again, thank you for being an SS&C Blue Prism customer.
regards
Geoff Hirst

SR DX Engineer, Integration and Enablement, Blue Prism Digital Exchange - EMEA