SlideShare a Scribd company logo
1 of 10
MSBuild – Inline Task

  Presented by Joncash
       4/5/2012



                         1
Outline
•   The Structure of an Inline Task
•   Input and Output Parameters
•   UsingTask Attributes
•   UsingTask Elements
•   Code Element
•   Examples
    – Hello world
    – BMI

                                      2
Structure of an Inline Task
<UsingTask
  TaskName="DoNothing"
  TaskFactory="CodeTaskFactory"
  AssemblyFile="$(MSBuildToolsPath)Microsoft.Build.Tasks.v4.0.dll"
>
       <ParameterGroup />
       <Task>
               <Reference Include="" />
               <Using Namespace="" />
               <Code Type="Fragment" Language="cs">
                      <!– Your code here-->
               </Code>
       </Task>
</UsingTask>
                                                                      3
UsingTask Attributes
<UsingTask                                              • TaskName
TaskName="DoNothing"
                                                        • TaskFactory
TaskFactory="CodeTaskFactory"
                                                          – The TaskFactory attribut
AssemblyFile=
"$(MSBuildToolsPath)Microsoft.Build.Tasks.v4.0.dll">       e names the class that
</UsingTask>                                                implements the inline
                                                            task factory
                                                        • AssemblyFile
                                                          – The AssemblyFile attribu
                                                            te gives the location of
                                                            the inline task factory.

                                                                                   4
UsingTask Elements
<UsingTask …>                      • ParameterGroup
    <ParameterGroup />               – Input and output
    <Task>                             paramerters
        <Reference Include="" />
                                   • Reference
        <Using Namespace="" />
                                     – Specifies references to
    </Task>
                                       the .NET assemblies that
</UsingTask>
                                       you are using in your code.
                                   • Using
                                     – The Using element lists the
                                       namespaces that you want
                                       to access.

                                                                 5
Code Element
<UsingTask …>                          • Type
  <Task>                                 – Class
      <Code
                                         – Method
       Type="Fragment"
                                         – Fragment
Language="cs">
      <![CDATA[                        • Language
      Log.LogError("Hello, world!");
                                         – cs for c#
      ]]>
                                         – vb for Visual Basic
       </Code>
  </Task>                                – js for JScript
</UsingTask>


                                                                 6
Input and Output Parameters
<UsingTask …>
    <ParameterGroup>
        <Height ParameterType="System.String" Required="true" />
         <Weight ParameterType="System.Int32" Required="true" />
         <BMI ParameterType="System.String" Output="true" />
    </ ParameterGroup>
    <Task>
        …
    </Task>
</UsingTask>




                                                                   7
HelloWorld




             8
BMI




      9
BMI Condition




                10

More Related Content

What's hot

CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Alexander Klimetschek
 
13 java beans
13 java beans13 java beans
13 java beans
snopteck
 
Parallel batch processing with spring batch slideshare
Parallel batch processing with spring batch   slideshareParallel batch processing with spring batch   slideshare
Parallel batch processing with spring batch slideshare
Morten Andersen-Gott
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSF
Jiayun Zhou
 

What's hot (20)

BASTA 2013: Custom OData Provider
BASTA 2013: Custom OData ProviderBASTA 2013: Custom OData Provider
BASTA 2013: Custom OData Provider
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
 
The CoFX Data Model
The CoFX Data ModelThe CoFX Data Model
The CoFX Data Model
 
Spring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaitonSpring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaiton
 
13 java beans
13 java beans13 java beans
13 java beans
 
Passing java arrays in oracle stored procedure from mule esb flow
Passing java arrays in oracle stored procedure from mule esb flowPassing java arrays in oracle stored procedure from mule esb flow
Passing java arrays in oracle stored procedure from mule esb flow
 
Drupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency InjectionDrupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency Injection
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven TomacJavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build System
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationGetting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
 
dotNet Miami - June 21, 2012: Richie Rump: Entity Framework: Code First and M...
dotNet Miami - June 21, 2012: Richie Rump: Entity Framework: Code First and M...dotNet Miami - June 21, 2012: Richie Rump: Entity Framework: Code First and M...
dotNet Miami - June 21, 2012: Richie Rump: Entity Framework: Code First and M...
 
High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018
 
Msql
Msql Msql
Msql
 
Above the clouds: introducing Akka
Above the clouds: introducing AkkaAbove the clouds: introducing Akka
Above the clouds: introducing Akka
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to DatabaseMuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
 
Parallel batch processing with spring batch slideshare
Parallel batch processing with spring batch   slideshareParallel batch processing with spring batch   slideshare
Parallel batch processing with spring batch slideshare
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSF
 

Similar to Ms build – inline task

Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
lennartkats
 
Apache ant
Apache antApache ant
Apache ant
koniik
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Entity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsEntity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic Unicorns
Richie Rump
 
El camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionEl camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - Introduction
Plain Concepts
 

Similar to Ms build – inline task (20)

Spring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffSpring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard Wolff
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrations
 
Scala and Spring
Scala and SpringScala and Spring
Scala and Spring
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
 
Apache ant
Apache antApache ant
Apache ant
 
Rails 3 (beta) Roundup
Rails 3 (beta) RoundupRails 3 (beta) Roundup
Rails 3 (beta) Roundup
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Entity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsEntity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic Unicorns
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
 
Lecture 5 JSTL, custom tags, maven
Lecture 5   JSTL, custom tags, mavenLecture 5   JSTL, custom tags, maven
Lecture 5 JSTL, custom tags, maven
 
Story ofcorespring infodeck
Story ofcorespring infodeckStory ofcorespring infodeck
Story ofcorespring infodeck
 
El camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionEl camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - Introduction
 
Celery with python
Celery with pythonCelery with python
Celery with python
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
 

More from LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Reflection &amp; activator
Reflection &amp; activatorReflection &amp; activator
Reflection &amp; activator
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 

Recently uploaded

Models in Deira 0567006274 Deira Call girl Service
Models in Deira 0567006274 Deira Call girl ServiceModels in Deira 0567006274 Deira Call girl Service
Models in Deira 0567006274 Deira Call girl Service
Monica Sydney
 
Ghansoli Escorts Services 09167354423 Ghansoli Call Girls,Call Girls In Ghan...
Ghansoli Escorts Services 09167354423  Ghansoli Call Girls,Call Girls In Ghan...Ghansoli Escorts Services 09167354423  Ghansoli Call Girls,Call Girls In Ghan...
Ghansoli Escorts Services 09167354423 Ghansoli Call Girls,Call Girls In Ghan...
Priya Reddy
 
Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123
Escorts in Lahore 03068178123
 

Recently uploaded (20)

Call Girls Bijapur - 9332606886 Rs 3000 Free Pickup & Drop Services 24x448
Call Girls Bijapur - 9332606886 Rs 3000 Free Pickup & Drop Services 24x448Call Girls Bijapur - 9332606886 Rs 3000 Free Pickup & Drop Services 24x448
Call Girls Bijapur - 9332606886 Rs 3000 Free Pickup & Drop Services 24x448
 
Call girls Service in Deira 0507330913 Deira Call girls
Call girls Service in Deira 0507330913 Deira Call girlsCall girls Service in Deira 0507330913 Deira Call girls
Call girls Service in Deira 0507330913 Deira Call girls
 
Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...
Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...
Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...
 
Models in Deira 0567006274 Deira Call girl Service
Models in Deira 0567006274 Deira Call girl ServiceModels in Deira 0567006274 Deira Call girl Service
Models in Deira 0567006274 Deira Call girl Service
 
Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
 
Ghansoli Escorts Services 09167354423 Ghansoli Call Girls,Call Girls In Ghan...
Ghansoli Escorts Services 09167354423  Ghansoli Call Girls,Call Girls In Ghan...Ghansoli Escorts Services 09167354423  Ghansoli Call Girls,Call Girls In Ghan...
Ghansoli Escorts Services 09167354423 Ghansoli Call Girls,Call Girls In Ghan...
 
Call Girls Bijnor Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Bijnor  Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Bijnor  Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Bijnor Just Call 8617370543 Top Class Call Girl Service Available
 
Pakistani Call girls in Ajman 0505086370 Ajman Call girls
Pakistani Call girls in Ajman 0505086370 Ajman Call girlsPakistani Call girls in Ajman 0505086370 Ajman Call girls
Pakistani Call girls in Ajman 0505086370 Ajman Call girls
 
Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...
Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...
Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...
 
Gonda Nitya salvi 8617370543 VIP model college girls ...
Gonda Nitya salvi 8617370543 VIP model college girls ...Gonda Nitya salvi 8617370543 VIP model college girls ...
Gonda Nitya salvi 8617370543 VIP model college girls ...
 
Satara call girl 8617370543♥️ call girls in satara escort service
Satara call girl 8617370543♥️ call girls in satara escort serviceSatara call girl 8617370543♥️ call girls in satara escort service
Satara call girl 8617370543♥️ call girls in satara escort service
 
Top IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdf
Top IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdfTop IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdf
Top IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdf
 
Call Girls in Kollam - 9332606886 Our call girls are sure to provide you with...
Call Girls in Kollam - 9332606886 Our call girls are sure to provide you with...Call Girls in Kollam - 9332606886 Our call girls are sure to provide you with...
Call Girls in Kollam - 9332606886 Our call girls are sure to provide you with...
 
Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123
 
Foreigner Call Girls Mahim WhatsApp +91-9833363713, Full Night Service
Foreigner Call Girls Mahim WhatsApp +91-9833363713, Full Night ServiceForeigner Call Girls Mahim WhatsApp +91-9833363713, Full Night Service
Foreigner Call Girls Mahim WhatsApp +91-9833363713, Full Night Service
 
Deira call girls 0507330913 Call girls in Deira
Deira call girls 0507330913  Call girls in DeiraDeira call girls 0507330913  Call girls in Deira
Deira call girls 0507330913 Call girls in Deira
 
Hire 💕 8617370543 Mirzapur Call Girls Service Call Girls Agency
Hire 💕 8617370543 Mirzapur Call Girls Service Call Girls AgencyHire 💕 8617370543 Mirzapur Call Girls Service Call Girls Agency
Hire 💕 8617370543 Mirzapur Call Girls Service Call Girls Agency
 
Bhubaneswar🌹Call Girls Kalpana Mesuem ❤Komal 9777949614 💟 Full Trusted CALL ...
Bhubaneswar🌹Call Girls Kalpana Mesuem  ❤Komal 9777949614 💟 Full Trusted CALL ...Bhubaneswar🌹Call Girls Kalpana Mesuem  ❤Komal 9777949614 💟 Full Trusted CALL ...
Bhubaneswar🌹Call Girls Kalpana Mesuem ❤Komal 9777949614 💟 Full Trusted CALL ...
 
Mandvi (Ahemdabad) Escorts 6367492432 with Real Phone number and Model
Mandvi (Ahemdabad) Escorts 6367492432 with Real Phone number and ModelMandvi (Ahemdabad) Escorts 6367492432 with Real Phone number and Model
Mandvi (Ahemdabad) Escorts 6367492432 with Real Phone number and Model
 
Dubai Call Girls 0556255850 Call girls in Dubai
Dubai Call Girls 0556255850 Call girls in DubaiDubai Call Girls 0556255850 Call girls in Dubai
Dubai Call Girls 0556255850 Call girls in Dubai
 

Ms build – inline task

  • 1. MSBuild – Inline Task Presented by Joncash 4/5/2012 1
  • 2. Outline • The Structure of an Inline Task • Input and Output Parameters • UsingTask Attributes • UsingTask Elements • Code Element • Examples – Hello world – BMI 2
  • 3. Structure of an Inline Task <UsingTask TaskName="DoNothing" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)Microsoft.Build.Tasks.v4.0.dll" > <ParameterGroup /> <Task> <Reference Include="" /> <Using Namespace="" /> <Code Type="Fragment" Language="cs"> <!– Your code here--> </Code> </Task> </UsingTask> 3
  • 4. UsingTask Attributes <UsingTask • TaskName TaskName="DoNothing" • TaskFactory TaskFactory="CodeTaskFactory" – The TaskFactory attribut AssemblyFile= "$(MSBuildToolsPath)Microsoft.Build.Tasks.v4.0.dll"> e names the class that </UsingTask> implements the inline task factory • AssemblyFile – The AssemblyFile attribu te gives the location of the inline task factory. 4
  • 5. UsingTask Elements <UsingTask …> • ParameterGroup <ParameterGroup /> – Input and output <Task> paramerters <Reference Include="" /> • Reference <Using Namespace="" /> – Specifies references to </Task> the .NET assemblies that </UsingTask> you are using in your code. • Using – The Using element lists the namespaces that you want to access. 5
  • 6. Code Element <UsingTask …> • Type <Task> – Class <Code – Method Type="Fragment" – Fragment Language="cs"> <![CDATA[ • Language Log.LogError("Hello, world!"); – cs for c# ]]> – vb for Visual Basic </Code> </Task> – js for JScript </UsingTask> 6
  • 7. Input and Output Parameters <UsingTask …> <ParameterGroup> <Height ParameterType="System.String" Required="true" /> <Weight ParameterType="System.Int32" Required="true" /> <BMI ParameterType="System.String" Output="true" /> </ ParameterGroup> <Task> … </Task> </UsingTask> 7
  • 9. BMI 9

Editor's Notes

  1. &lt;Reference Include=&amp;quot;System.Xml.dll&amp;quot;/&gt; &lt;Using Namespace=&amp;quot;System&amp;quot;/&gt; &lt;Using Namespace=&amp;quot;System.IO&amp;quot;/&gt;
  2. Alternatively, you can use the  Source  attribute of the  Code  element to specify the location of a file that contains the code for your task. The code in the source file must be of the type that is specified by the  Type  attribute. If the  Source  attribute is present, the default value of  Type  is  Class . If  Source is not present, the default value is  Fragment .
  3. Required  is an optional attribute that is  false  by default Output  is an optional attribute that is  false  by default