Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Heather@FootAnstey
Posts : 57
Join date : 2018-12-19

C# Questions: Need to add a reference to a 3rd Party DLL Empty C# Questions: Need to add a reference to a 3rd Party DLL

Sat 18 Apr 2020 - 12:27
Original Post: Paul Snow 25/03/2011 11:02:29

"I am trying to build in functionality to Matter Center to be able to launch Aderant Timer Gadgets from certain forms. I need to be able to add a reference to a .DLL in the Scripting Module. I have tried to use the reference function under the Languages menu in Scripting but it does not seem to pick up the reference. When in the scripting module. I select Language/Reference browse for the DLL and add it to the list. Here is my code:
using Aderant.TimerGadget.ServiceClient;Aderant.TimerGadget.ServiceClient.TimerGadgetServiceClientFactory NewTimer = new Aderant.TimerGadget.ServiceClient.TimerGadgetServiceClientFactory();NewTimer.StartTimer(““,”/Matter=123456”);
This code works in Visual Studio.
Any help would be appreciated. Thanks Paul."

Responses:

RichardA 25/03/2011 11:16:25
"Hi Paul,
What error do you get in matter centre? In your Visual studio project when you reference the DLL is it set to copy local?
I'm assuming that matter centre can't see the DLL because it and or it's dependencies will be outside of the current APPDOMAIN. You could try copying the DLL and dependencies into the matter centre install folder to confirm the above.
Regards Richard"

Paul Snow 25/03/2011 11:25:14
"I copied the DLL into C:\program files\fwbs\oms matter center and re-referenced the DLL. Here is the error:

Could not load file or Assembly 'Aderant.ExpertTimerGadget.ServiceClient,Version 1.8.0.0,Culture=neutral, PublicKeyToken=dc13af7c99484f31' or one of its dependencies. The system cannot find the file specified.

at OMS.Scriptlets._UDSCRTIMEEDIT.NETButton1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
"

Mike Walker CTO 25/03/2011 11:30:33
"There is likely to be other required DLL's that are needing to be referenced and or copied to the working folder. Is this a user control you wish to include inside your application and if so is the Aderant Assembly not registerable in the GAC on the machine?
I think there are a number of challenges in managing this and one option if it isn't a user control is to have a stub EXE that you can execute that can be installed within the Aderant Application folder to allow all of the dependant files to be present. I am not totally aware of the specific solution and or assembly so am unable to confirm more on any other solution. Regards
Mike"

Paul Snow 25/03/2011 17:35:09
"I created a stub application that I can launch from Matter Center to launch a Timer Gadget with the currently select fileID. Thanks for your help."

Back to top
Permissions in this forum:
You cannot reply to topics in this forum