Reputation: 1813
When running the following code:
<cfobject type=".NET" name="test"
class="GoCardlessSdk.GoCardless"
assembly="#expandpath("../GoCardlessSdk.dll")#">
<cfdump var="#test#">
I receive the error:
The assembly that contains the class must be provided to the assembly attribute. Message Class GoCardlessSdk.GoCardless not found in the specified assembly list.
The C# code for the class I am trying to call is show here.
Things I have done:
I have just tried the following code:
<cfobject type=".NET" name="proc" class="System.Diagnostics.Process">
<cfdump var="#proc#">
Which did work as expected which at least shows that the .Net service is running.
Any help to get overcome this would be much appreciated. Thanks!
Upvotes: 3
Views: 1030
Reputation: 1813
Problem solved. I needed to included the supporting DLLs:
<cfobject type=".NET" name="GoCardless" class="GoCardlessSdk.GoCardless" assembly="#expandpath("../GoCardlessSdk.dll")#,#expandpath("../Newtonsoft.Json.dll")#,#expandpath("../RestSharp.dll")#">
Upvotes: 2