Successfully reported this slideshow.

Proof of conecpt ms build property command 20120504 joncash-02

394 views

Published on

Published in: Education, Technology, Business
  • Be the first to comment

Proof of conecpt ms build property command 20120504 joncash-02

  1. 1. Proof of Concept -MSBuild /property:<n>=<v> Presented by Joncash 5/4/2012 1
  2. 2. MSBuild /property:<n>=<v>• /property:<n>=<v>• Set or override these project-level properties.• <n> is the property name• <v> is the property value• Use a semicolon or a comma to separate multiple properties, or specify each property separately.• Example :• /property:MyName=John;MyAge=20 2
  3. 3. PROOF OF CONCEPTPROJECT-LEVEL 3
  4. 4. Test.build Case 1<Property Group> <MyName>Mary</MyName></Property Group><Target Name = “Test”> <Message Text=“$(MyName)” /></Target>Msbuild Test.build /t:TestMaryMsbuild Test.build /t:Test /p:MyName=johnjohn 4
  5. 5. Test.build Case 2<Property Group> <MyName>Mary</MyName></Property Group><Target Name = “Test”> <Message Text=“Before: $(MyName)” /> <Property Group> <MyName>Bill</MyName> </Property Group> <Message Text=“After: $(MyName)” /></Target>Msbuild Test.build /t:Test /p:MyName=johnBefore:johnAfter:Bill 5
  6. 6. Property.build<Property Group> <MyName>Bill</MyName> <MyAge>20</MyAge></Property Group>….. 6
  7. 7. Test.build Case 3<Import project=“Property.build” /><Property Group> <MyName>Mary</MyName></Property Group><Target Name = “Test”> <Message Text=“$(MyName)” /></Target>Msbuild Test.build /t:TestMaryMsbuild Test.build /t:Test /p:MyName=johnjohn 7
  8. 8. Test.build Case 4<Property Group> <MyName>Mary</MyName></Property Group><Target Name = “Test”> <Message Text=“$(MyName)” /></Target><Import project=“Property.build” />Msbuild Test.build /t:TestBillMsbuild Test.build /t:Test /p:MyName=johnjohn 8
  9. 9. Test.build Case 5<Property Group> <MyName>Mary</MyName></Property Group><Target Name = “Test”> <Message Text=“$(MyName)” /> <Property Group> <MyName>Bill</MyName> </Property Group> <CallTarget Name=“Action” /></Target><Target Name=“Action”> <Message Text=“Action:$(MyName)” /></Target>Msbuild Test.build /t:Test /p:MyName=johnjohnAction:john 9
  10. 10. Test.build Case 6<Property Group> <MyName>Mary</MyName></Property Group><Target Name = “Test”> <Message Text=“$(MyName)” /> <Property Group> <MyName>Bill</MyName> </Property Group> <CallTarget Name=“Action” /></Target><Target Name=“Action”> <Message Text=“Action:$(MyName)” /></Target><Import project=“Property.build” />Msbuild Test.build /t:Test /p:MyName=johnjohnAction:john 10
  11. 11. Conclusion• MSBuild /property:<n>=<v> – Set or override these project-level properties.• project-level – A whole “.build”, including the import project. 11
  12. 12. THANK FOR YOUR LISTENING 12

×