MessageBox.Show('Managed minimalist custom task in action.', PTaskResult = DTSTaskExecResult.DTSTaskExecResult_Success Object pPackageLog, ref DTSTaskExecResult pTaskResult) Public void Execute( object pPackage, object pPackageEvents, Code for simple custom task looks like this :
All rights reserved.Īnd in directory where the command is executed will be that DTS.dll. 0Ĭopyright (C) Microsoft Corporation 1998-2001.
NET Framework Type Library to Assembly Converter. NET framework-bin is not included in path (don't tell that to anybody), browse to tlbimp.EXE and execute it from bin folder or rather include it in path variable. Tlbimp 'C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtspkg.DLL' If you need to do that manually use the following from command line : Using VS.NET it is easy, you will find it under COM tab. After that we need reference to Microsoft DTSPackage Object Library. We open new Class Library project and name it 'DTSCustomTask'. Writing simple CustomTask in C# is the easiest part. Today I finally forced myself to tackle that problem again and here is the result. In that article I stated that I didn't manage to solve the problem related to CustomTask. During last year I wrote an article about DTS and how to use it in C#.