cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with c# VBO integration

LudovicCOTTEZ-A
Level 4
Hello,
As part of one of our processes, we developed a small c# code on Visual Studio to retrieve information from IBM MQ.
We want to put it in a blueprism object, but we're encountering errors like "Predefined type 'System.Object' is not defined or imported".
22149.png
Here are the code options
22150.png
I have to admit I don't understand these errors, even though the system dll has been imported and there are no errors in Visual Studio.

Has anyone had this problem before?

Thanks in advance,



------------------------------
Ludovic COTTEZ-ABRATE
------------------------------
10 REPLIES 10

ewilson
Staff
Staff

@Ludovic COTTEZ-ABRATE 

When you say you developed the code in Visual Studio, which .NET framework did you target in your VS project? If you targeted anything other than .NET Framework v4.7 or v4.8 (depending on your BP version) you'll have problems like this. 

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hello @ewilson ,

It seems that the IBM MQ .NET DLL works with .NET Core 6.0.

Is there any way to still interface this code that will be used to retrieve input data for the virtual assistant?

Thanks,



------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

@Ludovic COTTEZ-ABRATE 

Sometimes you can get away with including references to the various .NET Core assemblies. Try adding a reference to System.Runtime.dll in the Code Options -> External References. However, sometimes this just leads to other more convoluted compiler errors.

I'm pretty sure IBM should have a .NET Framework version of the MQ libraries. Take a look at this link: https://www.ibm.com/docs/en/ibm-mq/9.3?topic=net-installing-mq-classes-framework

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson 

Thanks for your feedback.

We use the amqmdnetstd.dll from the following link https://www.nuget.org/packages/IBMMQDotnetClient

What we can't understand is that from visual studio the code works perfectly.

We added the following dlls earlier, but with the same problems:
Microsoft.CSharp 
System 
System.Core 
System.Data 
System.Data.DataSetExtensions 
System.Net.Http
System.Xml 
System.Runtime.dll



------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

@Ludovic COTTEZ-ABRATE 

Within that nuget there are two versions of the IBM DLL. One is built for .NET Core v6 while the other is built for .NET Standard v2. I'd try to the .NET Standard v2 library. Drop it in the Blue Prism Automate folder (ex. C:\Program Files\Blue Prism Limited\Blue Prism Automate) and restart your instance of Blue Prism. Then see if you get the same compiler errors.

22128.png

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson 

I've just tested by putting the dll present in the netstandard folder.
Without any reference to an additional DLL (to that of ibm mq) we get errors asking us to import the netstandard.dll.
And when we import it, we still get the same errors as when we created the post...



------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

@Ludovic COTTEZ-ABRATE 

What version of Blue Prism are you using?

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson 

We use BluePrism 7.2.0 on Windows Server 2019



------------------------------
Ludovic COTTEZ-ABRATE
------------------------------

@Ludovic COTTEZ-ABRATE 

32 or 64 bit version?

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------