Epicor Rest API - Assembly is not strong named

Hello,

I am trying to use Epicor Rest to call a BAQ in an external dll. I have downloaded the EpicorRestAPI nuget package successfully and created the parameters and call for a BAQ. This gave no compile errors. When I went to run a BPM which calls the method in which the rest call is located I get this error:

I noticed that the assembly in my project references has the “Strong name” property to false.

Does this need to be true? If so, how do i accomplish that?

Thanks!

Put that file in the folder where the executable is. Looks like it can’t find it.

The Epicor executable? So in the client folder?

Or where the dlls that reference it are located?

No, the program you made needs to know where that assembly is. You’ll either have to copy that assembly or move your program.

Are you using @josecgomez helper, or something else? If so he’s tagged now so maybe he can assist.

I am using @josecgomez helper program. I downloaded it from Nuget and it was installed Source/packages folder or our custom dll path. We have the SDK and this is how a consultant set it up for us.

I didn’t write a specific program for this. The code that executes the call is part of a custom external dll that Epicor BPMs can access and utilize.

Thanks for the insight.

When you build your program, does the resulting folder contain the EpicorRestAPI.dll? If so, drag that into the server assembly folder just like your program. It can’t find it when your program references it.

Is all you are doing running a BAQ? You can query data directly in a BPM using Linq like the solution here, and if all the external assembly does is call BAQs, it is over-complicating the process significantly.

I tried moving the dll to the server folder where our custom dll resides and I got the same error.

No the dll is extensive with other functionality. I am simply trying to run a BAQ rest call to test. I might pursue other avenues if I can’t resolve the error or use HTTPClient instead.

If you are on 10.1.600 still, there’s a chance you can’t run the binary. Is the latest .NET SDK installed on the server? His binary is compatible with .NET 4.8. I can’t remember if it is backwards compatible, but if it is, it would require the latest SDK.

We are running 10.2.700.14 and our dlls compile in 4.8. I need to check the SDK version.

I figured 10.2.700 required .NET 4.8. Maybe partially since none of the code features of 4.8 are available.

Typically, you’d only run into that specific .NET error when the file actually does not exist where expected (in your case, you have MyCustomServerCode.dll referencing EpicorRestAPI.dll, in the same folder unless specified otherwise), or if it is not compatible.

Yes hopefully @josecgomez or @jgiese.wci can shed some light on the error. I will keep trying for now. Thanks for your help Zach.

what is this helper you speak of?

It is an Epicor Rest library he created that facilitates Epicor’s rest functionality. Makes it easy to use Epicor’s rest functionality. Its called EpicorRestAPI. I downloaded it from within VS from the Nuget manager.

1 Like

thanks.

You are trying to use EpicorRest dll to call a baq from a BPM? That won’t work…I mean technically it could but why?

You have Db context instantiate the BO or use a Db query

What the error is saying is that our helper Dll is not strongly signed (it isn’t) but Epicor wants it to be (that shouldn’t be the case) so I suspect there’s something weird with your setup

Maybe the consultant strongly signed his external DLL?

Either way the setup doesn’t make a lot of sense calling an Epicor Rest endpoint from a BPM is like going around the world 3 times to cross the street

BPM happens server side you are already as close to the server / BO as you can be take advantage of that use Db context

1 Like

Yes I believe you are right. I think our custom dlls are strongly signed which is causing this error. I was trying to test the functionality of the rest call with a BPM to see how it worked cause i saw your video online and got curious. I see your point that if I am using a BPM to do that i might as well use the BO to call the BAQ (which I will most likely do or use an Epicor function).

I am going to try the BO method. Thanks for the insight.