Skip to content

Instantly share code, notes, and snippets.

@DoCode
Created October 27, 2015 13:48
Show Gist options
  • Save DoCode/45a2b80fc0f56245bae6 to your computer and use it in GitHub Desktop.
Save DoCode/45a2b80fc0f56245bae6 to your computer and use it in GitHub Desktop.
Regex to replace/append platformtarget to msbuild files
((.*\<Platform.*>)(.*)(</Platform>)\n(\s*))
$1<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">$3</PlatformTarget>\n$5
(.*\<PlatformTarget.*>)(.*)(</PlatformTarget>\n)
$1$(Platform)$3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment