【问题标题】:How to modify a master/aspx file in pre or post build events in Visual Studio and MSBuild?如何在 Visual Studio 和 MSBuild 的构建前或构建后事件中修改 master/aspx 文件?
【发布时间】:2012-12-05 22:35:42
【问题描述】:

我有一个 asp.net 主文件,其中包含一个带有 css 文件查询字符串的 url。我想在每次构建时自动修改查询字符串,无论是在 Visual Studio 2010 或 MSBuild 的构建前或构建后事件中。我可以编写一个程序来做到这一点,但我宁愿使用一些内置的方式。查询字符串可以是随机数或程序集的新版本号或递增查询字符串中已有的数字。

如何在其中一项活动中做到这一点?从命令行使用 MSbuild 执行此操作更为重要。

【问题讨论】:

    标签: visual-studio-2010 visual-studio msbuild


    【解决方案1】:

    这可以使用 MSBuild 社区任务项目中的 FileUpdate 任务来完成:https://github.com/loresoft/msbuildtasks

    【讨论】:

      猜你喜欢
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-05
      相关资源
      最近更新 更多