Open Source .NET Development [Electronic resources]

Brian Nantz

نسخه متنی -صفحه : 275/ 166
نمايش فراداده

<script> Executes the code contained within the task.

Attribute

Description

Required

language

The language of the script block (VB, C#, JS).

True

mainclass

Name of the main class containing the static ScriptMain entry point.

False

failonerror

Determines whether task failure stops the build or is just reported. Default is "true."

False

verbose

Task reports detailed build log messages. Default is "false."

False

if

If true then the task will be executed; otherwise skipped. Default is "true."

False

unless

Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false."

False

Example

<script language="C#"> <code> <![CDATA [ public static void ScriptMain(Project project) { System.Console.WriteLine("Hello World from a script task using C#"); } ]]> </code> </script>