SlideShare a Scribd company logo
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
Ad

Recommended

SenchaCon 2016: Modernizing the Ext JS Class System - Don Griffin
SenchaCon 2016: Modernizing the Ext JS Class System - Don Griffin
Sencha
 
Django Multi-DB in Anger
Django Multi-DB in Anger
Loren Davie
 
SenchaCon 2016: Upgrading an Ext JS 4.x Application to Ext JS 6.x - Mark Linc...
SenchaCon 2016: Upgrading an Ext JS 4.x Application to Ext JS 6.x - Mark Linc...
Sencha
 
Drupal 8 Services
Drupal 8 Services
Philip Norton
 
Managing themes and server environments with extensible configuration arrays
Managing themes and server environments with extensible configuration arrays
Chris Olbekson
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGM
JBug Italy
 
April 2010 - JBoss Web Services
April 2010 - JBoss Web Services
JBug Italy
 
Integrate with database by groovy
Integrate with database by groovy
Son Nguyen
 
BASTA 2013: Custom OData Provider
BASTA 2013: Custom OData Provider
Rainer Stropek
 
Spring introduction
Spring introduction
AnilKumar Etagowni
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Alexander Klimetschek
 
The CoFX Data Model
The CoFX Data Model
Rainer Stropek
 
Spring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaiton
tomi vanek
 
13 java beans
13 java beans
snopteck
 
Passing java arrays in oracle stored procedure from mule esb flow
Passing java arrays in oracle stored procedure from mule esb flow
Priyobroto Ghosh (Mule ESB Certified)
 
Drupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency Injection
Philip Norton
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
Sencha
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentation
sourabh aggarwal
 
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Gradle - Build System
Gradle - Build System
Jeevesh Pandey
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
Philip Norton
 
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
 
High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018
Vlad Mihalcea
 
Msql
Msql
ksujitha
 
Above the clouds: introducing Akka
Above the clouds: introducing Akka
nartamonov
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
akashdprajapati
 
Parallel 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 & JSF
Jiayun Zhou
 
Windows 8 für .net Entwickler
Windows 8 für .net Entwickler
Patric Boscolo
 
C# tutorial
C# tutorial
sarangowtham_gunnam
 

More Related Content

What's hot (20)

BASTA 2013: Custom OData Provider
BASTA 2013: Custom OData Provider
Rainer Stropek
 
Spring introduction
Spring introduction
AnilKumar Etagowni
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Alexander Klimetschek
 
The CoFX Data Model
The CoFX Data Model
Rainer Stropek
 
Spring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaiton
tomi vanek
 
13 java beans
13 java beans
snopteck
 
Passing java arrays in oracle stored procedure from mule esb flow
Passing java arrays in oracle stored procedure from mule esb flow
Priyobroto Ghosh (Mule ESB Certified)
 
Drupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency Injection
Philip Norton
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
Sencha
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentation
sourabh aggarwal
 
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Gradle - Build System
Gradle - Build System
Jeevesh Pandey
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
Philip Norton
 
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
 
High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018
Vlad Mihalcea
 
Msql
Msql
ksujitha
 
Above the clouds: introducing Akka
Above the clouds: introducing Akka
nartamonov
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
akashdprajapati
 
Parallel 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 & JSF
Jiayun Zhou
 
BASTA 2013: Custom OData Provider
BASTA 2013: Custom OData Provider
Rainer Stropek
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Alexander Klimetschek
 
Spring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaiton
tomi vanek
 
13 java beans
13 java beans
snopteck
 
Drupal 8 Services And Dependency Injection
Drupal 8 Services And Dependency Injection
Philip Norton
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
Sencha
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentation
sourabh aggarwal
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
Philip Norton
 
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
 
High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018
Vlad Mihalcea
 
Above the clouds: introducing Akka
Above the clouds: introducing Akka
nartamonov
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
akashdprajapati
 
Parallel 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 & JSF
Jiayun Zhou
 

Similar to Ms build – inline task (20)

Windows 8 für .net Entwickler
Windows 8 für .net Entwickler
Patric Boscolo
 
C# tutorial
C# tutorial
sarangowtham_gunnam
 
Summer Training In Dotnet
Summer Training In Dotnet
DUCC Systems
 
Summer training in dotnet
Summer training in dotnet
DUCC Systems
 
Dotnet framework difference faqs- 3
Dotnet framework difference faqs- 3
Umar Ali
 
The Google Web Toolkit Experience
The Google Web Toolkit Experience
supertoy2015
 
MS.NET Training
MS.NET Training
Deccansoft
 
A Comparative Analysis of Task Modeling Notations
A Comparative Analysis of Task Modeling Notations
Jean Vanderdonckt
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
Ayman El-Hattab
 
ProcessFlow Designer - Fashioning Solutions
ProcessFlow Designer - Fashioning Solutions
ConsultDavidW
 
Ien2012 DITA Open Toolkit Extension
Ien2012 DITA Open Toolkit Extension
sperotech
 
A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010
Abram John Limpin
 
10266 developing data access solutions with microsoft visual studio 2010
10266 developing data access solutions with microsoft visual studio 2010
bestip
 
Code accesssecurity
Code accesssecurity
Meenakshi Kumar
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
Twice. Ontwikkelaars van IT professionals
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
Delta-N
 
jBPM, open source BPM
jBPM, open source BPM
Kris Verlaenen
 
Tutorials building connectors
Tutorials building connectors
dekhoslides
 
Advanced Windows Debugging
Advanced Windows Debugging
Bala Subra
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
Mamgmo Magnda
 
Windows 8 für .net Entwickler
Windows 8 für .net Entwickler
Patric Boscolo
 
Summer Training In Dotnet
Summer Training In Dotnet
DUCC Systems
 
Summer training in dotnet
Summer training in dotnet
DUCC Systems
 
Dotnet framework difference faqs- 3
Dotnet framework difference faqs- 3
Umar Ali
 
The Google Web Toolkit Experience
The Google Web Toolkit Experience
supertoy2015
 
MS.NET Training
MS.NET Training
Deccansoft
 
A Comparative Analysis of Task Modeling Notations
A Comparative Analysis of Task Modeling Notations
Jean Vanderdonckt
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
Ayman El-Hattab
 
ProcessFlow Designer - Fashioning Solutions
ProcessFlow Designer - Fashioning Solutions
ConsultDavidW
 
Ien2012 DITA Open Toolkit Extension
Ien2012 DITA Open Toolkit Extension
sperotech
 
A Lap Around Visual Studio 2010
A Lap Around Visual Studio 2010
Abram John Limpin
 
10266 developing data access solutions with microsoft visual studio 2010
10266 developing data access solutions with microsoft visual studio 2010
bestip
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
Delta-N
 
Tutorials building connectors
Tutorials building connectors
dekhoslides
 
Advanced Windows Debugging
Advanced Windows Debugging
Bala Subra
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
Mamgmo Magnda
 
Ad

More from LearningTech (20)

vim
vim
LearningTech
 
PostCss
PostCss
LearningTech
 
ReactJs
ReactJs
LearningTech
 
Docker
Docker
LearningTech
 
Semantic ui
Semantic ui
LearningTech
 
node.js errors
node.js errors
LearningTech
 
Process control nodejs
Process control nodejs
LearningTech
 
Expression tree
Expression tree
LearningTech
 
SQL 效能調校
SQL 效能調校
LearningTech
 
flexbox report
flexbox report
LearningTech
 
Vic weekly learning_20160504
Vic weekly learning_20160504
LearningTech
 
Reflection &amp; activator
Reflection &amp; activator
LearningTech
 
Peggy markdown
Peggy markdown
LearningTech
 
Node child process
Node child process
LearningTech
 
20160415ken.lee
20160415ken.lee
LearningTech
 
Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
 
Expression tree
Expression tree
LearningTech
 
Vic weekly learning_20160325
Vic weekly learning_20160325
LearningTech
 
D3js learning tips
D3js learning tips
LearningTech
 
git command
git command
LearningTech
 
Ad

Recently uploaded (20)

在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭UANE学费单
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭UANE学费单
Taqyea
 
最新版美国堪萨斯州立大学毕业证(K-State毕业证书)原版定制
最新版美国堪萨斯州立大学毕业证(K-State毕业证书)原版定制
taqyea
 
Hasta la vista sota vita la humour.pptx
Hasta la vista sota vita la humour.pptx
JohnAsir4
 
burstone analysis.pptx..........................................................
burstone analysis.pptx..........................................................
UjjawalKrishnan
 
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
VenkatDeepakSarma
 
Jordan Minnesota - The Town Where Your Diet Comes to Die
Jordan Minnesota - The Town Where Your Diet Comes to Die
Forklift Trucks in Minnesota
 
最新版美国堪萨斯大学毕业证(KU毕业证书)原版定制
最新版美国堪萨斯大学毕业证(KU毕业证书)原版定制
taqyea
 
tiranga ritik baclink indexing on google
tiranga ritik baclink indexing on google
Jalwa Game
 
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
jitendergiri2000
 
原版一样(IWU毕业证书)美国印第安纳卫斯里大学毕业证在线购买
原版一样(IWU毕业证书)美国印第安纳卫斯里大学毕业证在线购买
taqyed
 
办理学历认证USC学生证西班牙圣地亚哥德孔波斯特拉大学电子毕业证,USC成绩单防伪
办理学历认证USC学生证西班牙圣地亚哥德孔波斯特拉大学电子毕业证,USC成绩单防伪
Taqyea
 
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
agustolosa93
 
Top 1 app watch girls livestream (1).docx
Top 1 app watch girls livestream (1).docx
jonhsey0009
 
Rice Genomics & Whole Genome Sequencing.pptx
Rice Genomics & Whole Genome Sequencing.pptx
LikhithHR
 
Breaking the Romance Narrative – Why I Wrote “Hello”
Breaking the Romance Narrative – Why I Wrote “Hello”
itstriggerhere
 
仿制CSUS学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,CSUS文凭
仿制CSUS学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,CSUS文凭
taqyed
 
16 Billions Google Leaked Password Alert in 2025
16 Billions Google Leaked Password Alert in 2025
Harshh Goel
 
silver_linings_playbook the movie the movie
silver_linings_playbook the movie the movie
VernonSmap
 
Strategy & Survival in Aliens Another Glorious Day in the Corps!
Strategy & Survival in Aliens Another Glorious Day in the Corps!
BoardGamesNMore
 
The Bet - Concept Teaser v06 Storyboards
The Bet - Concept Teaser v06 Storyboards
Jim Mortensen
 
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭UANE学费单
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭UANE学费单
Taqyea
 
最新版美国堪萨斯州立大学毕业证(K-State毕业证书)原版定制
最新版美国堪萨斯州立大学毕业证(K-State毕业证书)原版定制
taqyea
 
Hasta la vista sota vita la humour.pptx
Hasta la vista sota vita la humour.pptx
JohnAsir4
 
burstone analysis.pptx..........................................................
burstone analysis.pptx..........................................................
UjjawalKrishnan
 
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
VenkatDeepakSarma
 
Jordan Minnesota - The Town Where Your Diet Comes to Die
Jordan Minnesota - The Town Where Your Diet Comes to Die
Forklift Trucks in Minnesota
 
最新版美国堪萨斯大学毕业证(KU毕业证书)原版定制
最新版美国堪萨斯大学毕业证(KU毕业证书)原版定制
taqyea
 
tiranga ritik baclink indexing on google
tiranga ritik baclink indexing on google
Jalwa Game
 
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
jitendergiri2000
 
原版一样(IWU毕业证书)美国印第安纳卫斯里大学毕业证在线购买
原版一样(IWU毕业证书)美国印第安纳卫斯里大学毕业证在线购买
taqyed
 
办理学历认证USC学生证西班牙圣地亚哥德孔波斯特拉大学电子毕业证,USC成绩单防伪
办理学历认证USC学生证西班牙圣地亚哥德孔波斯特拉大学电子毕业证,USC成绩单防伪
Taqyea
 
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
agustolosa93
 
Top 1 app watch girls livestream (1).docx
Top 1 app watch girls livestream (1).docx
jonhsey0009
 
Rice Genomics & Whole Genome Sequencing.pptx
Rice Genomics & Whole Genome Sequencing.pptx
LikhithHR
 
Breaking the Romance Narrative – Why I Wrote “Hello”
Breaking the Romance Narrative – Why I Wrote “Hello”
itstriggerhere
 
仿制CSUS学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,CSUS文凭
仿制CSUS学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,CSUS文凭
taqyed
 
16 Billions Google Leaked Password Alert in 2025
16 Billions Google Leaked Password Alert in 2025
Harshh Goel
 
silver_linings_playbook the movie the movie
silver_linings_playbook the movie the movie
VernonSmap
 
Strategy & Survival in Aliens Another Glorious Day in the Corps!
Strategy & Survival in Aliens Another Glorious Day in the Corps!
BoardGamesNMore
 
The Bet - Concept Teaser v06 Storyboards
The Bet - Concept Teaser v06 Storyboards
Jim Mortensen
 

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

  • #6: &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;
  • #7: 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 .
  • #8: Required  is an optional attribute that is  false  by default Output  is an optional attribute that is  false  by default