Question
Unable to add external .dll in OpenSpan toolbox
I am trying to add an external .dll into my automation project. For my learning I created a .dll (GetName) from a class library project and I am trying to add that in OpenSpan toolbox
Following are the steps that I followed:
1) I created a C# class library project with one public method name GetName(string firstName, string lastName) that returns string as "Full name is firstName + lastName"
I made sure that the class library project is also built on .NET Framework 4.6.1, the same framework in which i am building automation. Code is as attached
2) I build the class library project. Copied the .dll from bin\Debug folder and pasted it to C:\Program Files (x86)\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015.
3) In my automation project I added a reference by referring to the .NET Component and selected GetName.dll
4) In my openspan project in Toolbox, I added the .dll reference by browsing the .dll
Now I am unable to view the .dll name or corresponding methods in Toolbox.
Please let me know what step I am missing to add this simple custom .dll in my OpenSpan toolbox.
Following is the code for GetName.dll for which I created a class library project with name GetName123
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GetName123
{
public class GetName
{
public GetName()
{ }
public string GetFullName(string firstName, string lastName)
{
return "My full name is " + firstName + " " + lastName;
}
}
}
Any help would be appreciated. Please let me know what need to be done so that I can view this custom dll i.e. GetName in my OpenSpan toolbox.
Let me know if you need any additional information from my end.
Thanks & Regards,
Randy
I would like to add that I was able to successfully add this custom .dll in another Windows Application project and was able to add this custom .dll as reference. Thereafter creating an instance of this imported .dll I was able to use the public functions.
But somehow in my OpenSpan project when I add reference of this .dll and try to add in toolbox it doesn't show up. Nor does it gave any error