开发者

Does MSBuild have an equivalent to the NAnt filterchain functionality for replacing tokens in files?

开发者 https://www.devze.com 2023-01-15 14:22 出处:网络
The NAnt task for copying files allows you to specify a filterchain that modifies the files as they ar开发者_如何学编程e copied, and this is usually used for replacing tokens in a template file with s

The NAnt task for copying files allows you to specify a filterchain that modifies the files as they ar开发者_如何学编程e copied, and this is usually used for replacing tokens in a template file with specific values (e.g. substituting in a build number).

Does MSBuild have equivalent functionality in one of its built-in tasks, or one of the freely available community tasks?


The standard msbuild tasks doesn't mention anything like that, but there's the FileUpdate task in the extensions at http://msbuildtasks.tigris.org/ that lets you easily do replacements in files based on regular expressions.

0

精彩评论

暂无评论...
验证码 换一张
取 消