Forums: How to use a third partly DLL in ASPRunner.NET project - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to use a third partly DLL in ASPRunner.NET project

#1 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 16109
  • Joined: 03-February 03
  • Gender:Male

Posted 25 January 2018 - 06:19 PM

We assume that you need to use code from these DLL files in your events.


1. You will need to copy some files from ASPRunner.NET installation folder to your project folder. If, for instance, you use ASPRunner.NET 32bit edition your installation folder is C:\Program Files (x86)\ASPRunnerNET9.8


If you need to write C# code copy these two files

<Installation folder>\source\eventsProjectCS.xml --> <Project folder>\source\eventsProjectCS.xml
<Installation folder>\source\include\CommonEvents.cs --> <Project folder>\source\include\CommonEvents.cs
<Installation folder>\source\include\TableEvents.cs --> <Project folder>\source\include\TableEvents.cs


If you need to write VB.NET code copy these two files

<Installation>\source\eventsProjectVB.xml --> <Project folder>\source\eventsProjectVB.xml
<Installation>\source\include\CommonEvents.vb --> <Project folder>\source\include\CommonEvents.vb
<Installation>\source\include\TableEvents.vb --> <Project folder>\source\include\TableEvents.vb


2. Copy your DLL files to <Project folder>\source\bin folder inside project directory. "bin" folder needs to be created if doesn't exist.

3. If you write events in C# open <Project folder>\source\eventsProjectCS.xml file in any text editor and add a reference to your DLL file where you see a bunch of other references. Add your reference at the end of section and it should look like this. This example assumes that your DLL file name is LibraryName.dll.

Quote

<Reference Include="LibraryName">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\LibraryName.dll</HintPath>
<Private>False</Private>
</Reference>



4. If you need to add your code to common events that doesn't belong to any table open <Project folder>\source\include\CommonEvents.cs in text editor. If you need to add code to table events edit <Project folder>\source\include\TableEvents.cs file. Add the following line after all other "using" statements in the beginning:

using LibraryName;


5. Now you can add your code and build your project.
Best regards,
Sergey Kornilov
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users