Development environment setup
This article explains how to set up the development environment for extending the connector functionality.
To setup the developer environment follow these steps:
- Open the InRiverOutboundConnector.sln file located in the "Src" folder of the deployment package.
- Build the solution.
The inRiver and Litium Studio reference dlls are placed inside the Src\SharedLib folder. If you wish to build against the latest version of litium studio or inRiver which is newer than what is included here, you should either change the project references or copy those dlls to shared lib folder.
Program structure
- The Litium.Studio.AddOns.Inriver project contains completely inRiver specific information, including dll references to inRiver server and integration.
- The Litium.Studio.AddOns.InRiver.Integration project contains completely Litium Studio specific information, including dll references to Litium Studio.
- The Litium.Studio.AddOns.InRiver.Data project is referrenced by both the above dlls and contains the common code, which makes it possible to match the Litium Studio API with inRiver API.
When you continue development, try to maintain the above structure so that you do not have to copy the Litium Studio dlls to inRiver server folders nor inRiver dlls to Litium Studio web\bin.
Building into inRiver and Litium Studio
The Litium.Studio.AddOns.Inriver project output should be placed into the inRiver connect folder, typically located at "C:\Program Files\inRiver AB\inRiver Connect\OutboundConnectors".
The project settings has a post build event that will execute a .cmd file called "DeployToInRiver.cmd" in the solution directory. This .cmd file is not shipped with the source code. Following is the sample code for this file, which automatically stops and starts inRiver connect, so that the file copy goes smoothly without file locking errors.
__________________________________________________________________________________________________________________________
@echo off
REM Deploy InRiver dlls to InRiver outbound connector folder-------------------------------------------------
REM Litium.Studio.InRiver project build event executes this file.
SET SRC_DIR=E:\work\src\Litium.Studio.AddOns\Hotfix\4.6.2\InRiverConnector\InRiverOutboundConnector\Src\
SET DEST_DIR="C:\Program Files\inRiver AB\inRiver Connect\OutboundConnectors"
net stop "InRiver Connect"
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver.Data\bin\Debug\Litium.Studio.AddOns.InRiver.Data.dll %DEST_DIR% /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver.Data\bin\Debug\Litium.Studio.AddOns.InRiver.Data.pdb %DEST_DIR% /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver\bin\Debug\Litium.Studio.AddOns.InRiver.dll %DEST_DIR% /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver\bin\Debug\Litium.Studio.AddOns.InRiver.pdb %DEST_DIR% /Q/S/Y/R
net start "InRiver Connect"
__________________________________________________________________________________________________________________________
Similarly, Litium.Studio.AddOns.InRiver.Integration project output has to be coppied into your Litium Studio webroot\bin folder. That project includes a post build event to execute a command file called fileCopy.cmd from the solutions directory. Sample code below:
@echo off
REM Deploy InRiver WebSite pages and dlls to Litium Studio web folder-------------------------------------------------
REM Litium.Studio.InRiver.Integration project build event executes this file.
SET SRC_DIR=E:\work\src\Litium.Studio.AddOns\Hotfix\4.6.2\InRiverConnector\InRiverOutboundConnector\Src
SET DEST_DIR=E:\work\inetpub\InRiver\wwwroot
xcopy %SRC_DIR%\WEB\SITE %DEST_DIR%\SITE /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver.Data\bin\Debug\Litium.Studio.AddOns.InRiver.Data.dll %DEST_DIR%\BIN /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver.Data\bin\Debug\Litium.Studio.AddOns.InRiver.Data.pdb %DEST_DIR%\BIN /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver.Integration\bin\Debug\Litium.Studio.AddOns.InRiver.Integration.dll %DEST_DIR%\BIN /Q/S/Y/R
xcopy %SRC_DIR%\Litium.Studio.AddOns.InRiver.Integration\bin\Debug\Litium.Studio.AddOns.InRiver.Integration.pdb %DEST_DIR%\BIN /Q/S/Y/R
When you have created these files, your solution folder will look similar to following.
