Deploying Event System Extensions in 8.5

Writing code .. that’s the easy part. The hard part can sometimes be deploying the code.

I’ve recently been working on some event system code in SDL Web 8.5 and wanted to deploy it. This is a simple matter of stopping a service or two, copying over the DLL, and then restarting the services.

Rather than re-invent the wheel I referred to my notes in Intro to the Event System, but then realized that the service model within Web 8.5 was quite a bit different.

So I headed off to re-invent the wheel.

The following batch file (in my case, at least) will stop the right services in the right order, update the DLL, and restart the right services. By using a batch file that has no prompts I can use a Jenkins process to update the DLL on computers that I don’t have the right access to.

@echo off

echo Stopping Tridion App Pool
c:\windows\system32\inetsrv\appcmd stop apppool /apppool.name:"SDL Tridion"

echo Stopping Services
echo World Wide Web Publishing Service
net stop "w3svc"

echo COM+ System Application
net stop "COMSysApp"

echo System Event Notification Service
net stop "SENS"

echo COM+ Event System
net stop "EventSystem"

echo SDL Web Content Manager Publisher
net stop "TcmPublisher"

echo SDL Web Content Distributor Transport Service
net stop "TCDTransportService"

echo SDL Web Content Manager Batch Processor
net stop "TcmBatchProcessor"

echo SDL Web Content Manager Search Indexer
net stop "TcmSearchIndexer"

echo SDL Web Content Manager Workflow Agent
net stop "TCMWorkflow"

echo SDL Web Content Manager Service Host
net stop "TcmServiceHost"

echo Deploying DLL to deployment folder
xcopy "C:\DevelopmentFolder\bin\Release\CustomEventSystemDLL.dll" "C:\DeploymentFolder" /yi

echo Starting Services
net start "TcmServiceHost"
net start "TCMWorkflow"
net start "TcmSearchIndexer"
net start "TcmBatchProcessor"
net start "TCDTransportService"
net start "TcmPublisher"
net start "EventSystem"
net start "SENS"
net start "COMSysApp"
net start "w3svc"

echo Starting Tridion App Pool
c:\windows\system32\inetsrv\appcmd start apppool /apppool.name:"SDL Tridion"

pause
This entry was posted in Tridion news by Paul Russell. Bookmark the permalink.

About Paul Russell

Paul has 30+ years of experience with developing software, and has watched the internet evolve into the web and web 2.0. It has always been an exciting time to develop software because so many things are happening and everything is new. I'm really looking forward to what tomorrow has to offer!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>