Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] Third Party Tools

Thread Tools Rate Thread Display Modes
Old 06-16-2010, 01:22 PM
jdavidi jdavidi is online now
Registered User
Join Date: 10-27-2003
Posts: 38
Question Adding elements to a csproj?


We're attempting to leverage Visual Build's read/write XML capabilities to aid in a large scale csproj file update. Essentially, we're looking to specify the Target Platform to be x86 for all current build configurations (this is a change from its default of AnyCPU).

This involves the addition of the following element to each of the <PorpertyGroup> nodes that are concerned with build configurations:


The attached bld file I believe is correctly querying out the 2 nodes in the sample csproj file correctly, and it adds an almost-correct node,
<TargetPlatform xmlns="">x86</TargetPlatform>

to the first of these 2 Property groups.

I'm unsure of :

a) if a loop is needed, the syntax for the write XML step to go after the one particular node in turn (or can the Update All Matching Nodes property be used instead of a loop?)

b) why xmlns="" is getting added. I presume this is due to the XPath expression (of which I'm also new to).

Thanks for any help!

Attached Files
File Type: bld csproj-targetplatformupdate.bld (11.2 KB, 569 views)
Reply With Quote
Old 06-17-2010, 09:57 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,764
See attached.
Attached Files
File Type: bld csproj-targetplatformupdate2.bld (11.1 KB, 622 views)
Reply With Quote
Old 06-17-2010, 10:04 AM
jdavidi jdavidi is online now
Registered User
Join Date: 10-27-2003
Posts: 38
Whew...I bow to the masters. Thanks a million!
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

All times are GMT -5. The time now is 01:20 AM.

Copyright 1999-2019 Kinook Software, Inc.