Getting Started

Okay, now lets get started. Download the Zip file and UNBLOCK it before Unzipping.

Unblock zip

Then, navigate to the folder named 'Main Assembly' where you will find the exe file named SpiceLogicCodedTaskRunner.exe. This is the assembly that does all.

Now, lets show you how you can create a Task Container Project and invoke this tool to Run when you hit the START button from Visual Studio. You will find a Sample Project in the Downloaded package.

Say, you have a Windows Application named 'Simple Calculator'. You want to automate the deployment of that software product. Create a new Class Library Project in the solution. Add a reference to the SpiceLogicCodedTaskRunner.exe file to that project.

referene

Alright, now create a class with any name and inherit that class from a class named "CodedTaskIndexBase". Add a Description attribute to that class that should be shown as a the name of the task set in the tool. Now, override a method named "ListAllCodedTasks()" which will return IList<CodedTaskBase>. Create your first task as follows:

simple_ 1st_task

OK, we have just added a task. Lets add another task top open a browser with Google.com.

second task added

You must be uncomfortable about the code clutter in this ListAllCodedTasks() method. Actually, you can encapsulate your task code in a separate class and create an instance of that class for individual task. That is the recommended way and explained in this page.

Anyway, now, build the project and navigate to the Bin folder. If you setup your project for Debug Mode, then, navigate to Bin/Debug folder and you will see the SpiceLogicCodedTaskRunner.exe file published in this folder. Double click that to run and from Setting menu, choose the option 'Configure Visual Studio Project file for starting this app'.

Run tool to configure

Once you click that menu option, a File Chooser Dialog will open. Navigate to the folder where you have the Automated Deployment Project file. For your convenient, the File Choose dialog will have that directory as the initial directory, so you may not need to do hard work to locate that folder. Simply select the project file and click Ok.

select project file

Then, go back to Visual Studio and you will find the dialog asking for Reloading the Project. Hit the Reload All button.

reload project

Now, you can hit the START button from Visual Studio to invoke the Tool. You will see the 2 tasks that we created in the code.

starting the tool

Here you go. You got started with Visual Coded Task Runner. Now, you know what to do. You can click the 'Run All Tasks' button to execute all tasks one by one. You can also click the run button of an individual task to run that task individually. You see the Thumb Up button beside the Run button. That Thumb Up button can be used to Mark a task as Executed without really executing the task. You may need this feature sometimes when you do not want to execute a lenghy task when Automatic Task Runner is running all tasks one by one. If a task is marked as Executed, then, until you reset the Session, that task will not be executed by 'Run All Tasks' action. You can see the Completed Task Result from the Success (Check Mark) Button.

view_success_status

Also you can see the Full Log.

view_log

By the way, you do not necessarily need to start the Visual Coded Task Runner from Visual Studio. You can run this Application independently and load the Tasks by selecting the DLL that contains the task. When you Built the Automated Deployment Project, a dll is created in the bin folder for that project, right ? Thats the DLL you can load directly to this application.

Run the app independently

Therefore, you can compile your tasks in a DLL and send the dll to someone who is responsible for running the deployment tasks. Visual Studio is not needed to Run the Tasks. But you may like to run the tasks from Visual Studio, because, same like other MS Build type scripting procedure, you will be able to change the code instantly and Run again. Also you can Debug your code from Visual Studio.

Last updated on 26 December 2014, Friday, 4:35:41 PM