I am attempting to fix a problem with the SQLite makefile in an MSBuild project using the MSBuildCommunityTasks FileUpdate task.
I need to replace the exact string "$(LTLIBOPTS) $(LTLIBPATHS)" with the exact string "$(LTLIBOPTS) $(LTLIBPATHS) $(TCLLIBPATHS)."
I have figured out a regex that matches the string I am searching for. It is as follows.
\$\x28LTLIBOPTS\x29 \$\x28LTLIBPATHS\x29
The problem is that I cannot figure out what magical incantation to use for the ReplacementText to get it to replace it with the required text. The closest I could get was as follows.
$$\(LTLIBOPTS\) $$\(LTLIBPATHS\) $$\(TCLLIBPATHS\)
I am using the FileUpdate task as follows.
<FileUpdate
Files="$(MSBuildProjectDirectory)\$(SQLITE_DIR)\Makefile.msc"
Regex="\$\x28LTLIBOPTS\x29 \$\x28LTLIBPATHS\x29"
ReplacementText="$$\(LTLIBOPTS\) $$\(LTLIBPATHS\) $$\(TCLLIBPATHS\)" />
This results in the following being inserted in the file.
$\(LTLIBOPTS\) $\(LTLIBPATHS\) $\(TCLLIBPATHS\)
Can someone please tell me what magical incantation I need to use for the ReplacementText?
Thanks.
Also, is there a way to do a file search and replace in MsBuild without having to mess with regular expressions? I hate regular expressions.